Created
September 4, 2013 06:42
-
-
Save fatuk/6433451 to your computer and use it in GitHub Desktop.
Timeout for window resizing
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 initFunction(){ | |
// Function that has to be called on document ready and after resize | |
}; | |
$(window).load(function () { | |
initFunction(); | |
var resizeTimer; | |
$(window).resize(function () { | |
clearTimeout(resizeTimer); | |
resizeTimer = setTimeout(initFunction, 200); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment