Skip to content

Instantly share code, notes, and snippets.

@davidbarredo
Created November 19, 2013 18:42
Show Gist options
  • Save davidbarredo/7550290 to your computer and use it in GitHub Desktop.
Save davidbarredo/7550290 to your computer and use it in GitHub Desktop.
Detect end of window resize (with timer help)
window.onresize = function() {
if ( this.resizeTimer ) clearTimeout( this.resizeTimer );
this.resizeTimer = setTimeout ( function() {
/* Your code here */
}, 500 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment