Reputation: 3
I am using $(window).height(), but when I am resizing the window horizontally, it gives wrong values for just a moment. Lets say first its 974 , then it goes 957, then up again.
Upvotes: 0
Views: 176
Reputation: 793
There can be multiple cases.
1) The most simple one: Add <!DOCTYPE HTML>
declaration to your HTML page ( http://viralpatel.net/blogs/jquery-window-height-incorrect/ )
2) It is possible that you are checking the console with firebug/ something else. So that you don't get window height correct due to firebug height.
See more info here why is $(window).height() so wrong?
Upvotes: 1