Skip to content

Instantly share code, notes, and snippets.

@muloka
Created March 28, 2011 16:20
Show Gist options
  • Save muloka/890761 to your computer and use it in GitHub Desktop.
Save muloka/890761 to your computer and use it in GitHub Desktop.
(function(){ alert('later!'); }).delay(1);
// function is called 1 second later ^^
Function.prototype.delay = function(seconds){
setTimeout(this, seconds*1000);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment