if ($.browser.msie) { function debouncer(func, timeout) { var timeoutID, timeout = timeout || 200; return function () { var scope = this, args = arguments; clearTimeout(timeoutID); timeoutID = setTimeout(function () { func.apply(scope, Array.prototype.slice.call(args)); }, timeout); } } $(window).resize(debouncer(function (e) { myfn(); //your staff here })); }
got it from here