Last active
August 29, 2015 14:16
-
-
Save jenter/0f65d9741afd17806997 to your computer and use it in GitHub Desktop.
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
var timerEl; | |
$(window).bind("resize", function () { | |
if (timerEl) { | |
clearTimeout(timerEl); | |
} | |
timerEl = setTimeout(function () { | |
// put code here //////// | |
console.log('the page has been resized'); | |
}, 500); // this only fires every 500ms or half second | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment