|
|
|
|
|
by jQueryIsAwesome
4917 days ago
|
|
And in JS is really easy to create an abstraction for this issue: 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
});
|
|