davidlee
davidlee

Reputation: 6167

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..

Upvotes: 4

Views: 4952

Answers (2)

Andreyco
Andreyco

Reputation: 22872

height=$(window).height();

Upvotes: 0

jasssonpet
jasssonpet

Reputation: 2119

From the jQuery documentation:

$(window).height();   // returns height of browser viewport
$(document).height(); // returns height of HTML document

Upvotes: 9

Related Questions