Created
February 11, 2014 14:44
-
-
Save bitboxx/8936109 to your computer and use it in GitHub Desktop.
Javascript: Run a function after resize event has ended
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
// the function is only run after the resize has ended | |
var timeout; | |
window.onresize = function(){ | |
clearTimeout(timeout); | |
timeout = setTimeout(function () { | |
// do wonderful things here | |
}, 100); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment