by jQueryIsAwesome · 13y ago · 0 comments
function wait(o){
return setTimeout(function(){ o.action.call(o.this) },o.delay*1000)
}
To use it like this: wait({
action : function(){ console.log(this) },
delay : 1,
this : this
});