Skip to content

Instantly share code, notes, and snippets.

@davidsonfellipe
Last active October 11, 2015 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidsonfellipe/3791691 to your computer and use it in GitHub Desktop.
Save davidsonfellipe/3791691 to your computer and use it in GitHub Desktop.
setDelay Javascript
var setDelay = (function(){
var timeout = 0;
return function(callback, milliseconds){
clearTimeout (timeout);
timeout = setTimeout(callback, milliseconds);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment