Lego2012
12/13/2016 - 2:36 PM

Heights in jQuery

Heights in jQuery

<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.

<!-- Height of browser window: -->

var winheight = $(window).height()

<!-- Height of entire document: -->

var docheight = $(document).height()

<!-- Distance scrolled from top: -->

var scrollTop = $(window).scrollTop()

<!-- Element's offset from top: -->

targetoffsetTop = $('#header').offset().top // get distance between top of header element and top of document