Created
September 28, 2012 04:25
-
-
Save kcliu/3797909 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function resizeStuff() { | |
//Time consuming resize stuff here | |
} | |
var TO = false; | |
$(window).resize(function(){ | |
if(TO !== false) | |
clearTimeout(TO); | |
TO = setTimeout(resizeStuff, 200); //200 is time in miliseconds | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment