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.

--ADVERTISEMENT--

Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the most important and interesting stories in tech. Straight to your inbox, daily.