0

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.

console

Erad
  • 3
  • 5

1 Answers1

1

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?

Community
  • 1
  • 1
Mojo Allmighty
  • 793
  • 7
  • 18