I have a little problem with window resizing using jQuery\'s function .resize(). I would like to know which dimension is getting bigger/smaller - width or height. I need thi
var h = $(window).height(), w = $(window).width();
$(window).resize(function(){
var nh = $(window).height(), nw = $(window).width();
// compare the corresponding variables.
h = nh; w = nw; // update h and w;
});