Skip to content

Instantly share code, notes, and snippets.

@appden
Created May 6, 2010 03:39
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 appden/391752 to your computer and use it in GitHub Desktop.
Save appden/391752 to your computer and use it in GitHub Desktop.
// fun experiment :-)
Element.implement('wait', function(duration){
var el = this, stack = [];
stack.each.delay(duration || 500, stack, function(info){
el = el[info.name].apply(el, info.args);
});
return Object.map(Element.prototype, function(method, name){
return function(){
stack.push({name: name, args: arguments});
return this;
};
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment