Skip to content

Instantly share code, notes, and snippets.

@nvquanghuy
Created Sep 12, 2014
Embed
What would you like to do?
resize triggering
// Create a resizeEnd event trigger
$(function () {
$(window).resize(function () {
if (this.resizeTO) clearTimeout(this.resizeTO);
this.resizeTO = setTimeout(function () {
$(this).trigger('resizeEnd');
}, 500);
});
});
$(window).on('resizeEnd', function () {
// do whatever
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment