Skip to content

Instantly share code, notes, and snippets.

@bitboxx
Created February 11, 2014 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bitboxx/8936109 to your computer and use it in GitHub Desktop.
Save bitboxx/8936109 to your computer and use it in GitHub Desktop.
Javascript: Run a function after resize event has ended
// 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