Created
May 28, 2016 14:42
-
-
Save olivertappin/22101332de5d6387b945b2513a8f17c7 to your computer and use it in GitHub Desktop.
Screen resize function with interval
This file contains 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
$(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