Last active
July 30, 2016 20:51
-
-
Save soerson/b84f3d6b44650576a03e93731c794bbe to your computer and use it in GitHub Desktop.
window resize event handler
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
| var resizeID; | |
| window.addEventListener("resize", function () { | |
| clearTimeout(resizeID); | |
| resizeID = setTimeout(resizeHandler, 500); | |
| }); | |
| function resizeHandler() { | |
| /* ... */ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment