I'm trying to get the current browser viewport height, using
$(window).on('resize',function() {
console.log("new height is: "+$(window).height());
});
But I'm getting values that are way too low. When the viewport is around 850px tall, I'm getting values around 350 or 400px from height(). What's up?
Example: http://jsfiddle.net/forgetcolor/SVqx9/
I was having the same problem in Firefox then I added <!DOCTYPE HTML>
on my index and it worked.
Source: http://viralpatel.net/blogs/jquery-window-height-incorrect/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With