Skip to content

Instantly share code, notes, and snippets.

@zerosignalproductions
Last active December 20, 2015 03:19
Show Gist options
  • Save zerosignalproductions/6062939 to your computer and use it in GitHub Desktop.
Save zerosignalproductions/6062939 to your computer and use it in GitHub Desktop.
var rtime = new Date(1, 1, 2000, 12,00,00);
var timeout = false;
var delta = 200;
$(window).resize(function() {
rtime = new Date();
if (timeout === false) {
timeout = true;
setTimeout(resizeend, delta);
}
});
function resizeend() {
if (new Date() - rtime < delta) {
setTimeout(resizeend, delta);
} else {
timeout = false;
alert('Done resizing');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment