Skip to content

Instantly share code, notes, and snippets.

@amaxwell01
Created December 3, 2012 23:52
Show Gist options
  • Select an option

  • Save amaxwell01/4199170 to your computer and use it in GitHub Desktop.

Select an option

Save amaxwell01/4199170 to your computer and use it in GitHub Desktop.
window resize delay
// Run code on resize, but give it a slight delay so that we aren't always calculating it
$(window).resize( function() {
if( timer ) {
clearTimeout(timer);
}
var timer = setTimeout( function() {
// On Resize Code Goes Here
}, 100 );
});
@kenhowardpdx
Copy link

You are a life saver!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment