Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get window height?

window height is getting the length of the html document rather than the size of my browser window.

Do you know where I'm going wrong?

Here's my script:

$(document).ready(function() {
            alert($( window ).height());
    });

I also have at the top of my doc which I've read can cause issues:

<!DOCTYPE html>
like image 753
panthro Avatar asked May 08 '14 15:05

panthro


1 Answers

window.innerHeight

$(document).ready(function() {
     alert(window.innerHeight);
});
like image 196
Donald Powell Avatar answered Oct 02 '22 17:10

Donald Powell