So I currently use something like:
$(window).resize(function(){resizedw();});
But this gets called many times while resizing process goes o
You can use setTimeout() and clearTimeout()
setTimeout()
clearTimeout()
function resizedw(){ // Haven't resized in 100ms! } var doit; window.onresize = function(){ clearTimeout(doit); doit = setTimeout(resizedw, 100); };
Code example on jsfiddle.