Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get web page height through jQuery

How can I get the height of viewable web page of browser with jquery? I have tried $(window).height() but it did not return accurate result.. Thanks..

like image 405
davidlee Avatar asked Jan 21 '23 16:01

davidlee


1 Answers

From the jQuery documentation:

$(window).height();   // returns height of browser viewport
$(document).height(); // returns height of HTML document
like image 125
jasssonpet Avatar answered Jan 29 '23 10:01

jasssonpet