I\'m using JQuery as such:
$(window).resize(function() { ... });
However, it appears that if the person manually resizes their browser wind
I prefer to create an event:
$(window).bind('resizeEnd', function() {
//do something, window hasn't changed size in 500ms
});
Here is how you create it:
$(window).resize(function() {
if(this.resizeTO) clearTimeout(this.resizeTO);
this.resizeTO = setTimeout(function() {
$(this).trigger('resizeEnd');
}, 500);
});
You could have this in a global javascript file somewhere.