Last active
January 14, 2016 12:20
-
-
Save scepion1d/2339453 to your computer and use it in GitHub Desktop.
Cross Browser JS Window Resizing
This file contains hidden or 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 doSomething() { | |
alert("I'm done resizing for the moment"); | |
}; | |
var resizeTimer; | |
$(window).resize(function() { | |
clearTimeout(resizeTimer); | |
resizeTimer = setTimeout(doSomething, 100); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment