Created
July 30, 2016 06:22
-
-
Save kurtextrem/01d1f0650fe40d84ce8a1b60892d64ce to your computer and use it in GitHub Desktop.
Throttle Function
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 on_resize(namespace, callback, t) { | |
$(window).on('resize.' + namespace, function () { | |
clearTimeout(t); | |
t = setTimeout(callback, 100); | |
}); | |
return callback; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment