Object.prototype.later =
function (msec, method) {
var that = this,
args = Array.prototype.slice.
apply(arguments, [2]);
if (typeof method === 'string') {
method = that[method];
}
setTimeout(function () {
method.apply(that, args);
}, msec);
return that;
};
Friday, October 16, 2009
later method
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment