How can I detect window/browser size with jQuery like Gmail? In Gmail, we don\'t need to refresh or reload current page as soon as we have changed window resolution in windo
//get dimensions
var height = $(window).height();
var width = $(window).width();
//refresh on resize
$(window).resize(function() {
location.reload(true)
});
not sure if you wanted to tinker with the dimensions of elements or actually refresh the page. so here a bunch of different things pick what you want. you can even put the height and width in the resize event if you really wanted.