JavaScript
Article
By Sam Deering

jQuery Get Length of Webpage

By Sam Deering

jQuery code snippet to get the length (height) of a web page.

var webpage = $("body");
var webpage_height = webpage.height();
alert(webpage_height);

Note you can also use: $(document).height() or $(window).height() instead of body selector.

Recommended
Sponsors
Get the latest in JavaScript, once a week, for free.