Skip to content

Instantly share code, notes, and snippets.

@IanRamosC
Created May 17, 2015 17:54
Show Gist options
  • Save IanRamosC/e315a42459a8a7beb1f5 to your computer and use it in GitHub Desktop.
Save IanRamosC/e315a42459a8a7beb1f5 to your computer and use it in GitHub Desktop.
Debounce Concept
var debounce = function(handler, delay) {
var timeout;
return function() {
clearTimeout(timeout);
timeout = setTimeout(function() {
handler();
}, delay);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment