I\'m trying to get the current browser viewport height, using
$(window).on(\'resize\',function() {
console.log(\"new height is: \"+$(window).height());
One possible reason may be that you are checking the console with firebug/ something else. So that you don't get window height correct due to firebug height.
You can try something like this:
take a span/div in you document:
and then
$(window).on('resize',function() {
$('#res').html("new height is: "+$(window).height());
});
Or if you want to check out put on firebug console then detach it from browser and then check the result.