Skip to content

Instantly share code, notes, and snippets.

@harishvc
Last active December 30, 2015 09:34
mapit - content.js (browser resize)
var timeoutId = 0;
window.addEventListener('resize', function() {
if (DEBUG === true) { console.log("browser resizing ......");}
if (timeoutId) {
clearTimeout(timeoutId);
}
timeoutId = setTimeout(function() {
Start();
timeoutId = 0;
}, 100);
}, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment