Skip to content

Instantly share code, notes, and snippets.

@olivertappin
Created May 28, 2016 14:42
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 olivertappin/22101332de5d6387b945b2513a8f17c7 to your computer and use it in GitHub Desktop.
Save olivertappin/22101332de5d6387b945b2513a8f17c7 to your computer and use it in GitHub Desktop.
Screen resize function with interval
$(window).resize(function() {
if (this.resizeTo) clearTimeout(this.resizeTo);
this.resizeTo = setTimeout(function() {
$(this).trigger('resizeEvent');
}, 500);
});
$(window).bind('resizeEvent', function() {
// Rezize events
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment