2010-02-19から1日間の記事一覧
Function.prototype.delay = function(n) { var self = this; var args = Array.prototype.slice.call(arguments, 1); var id = setTimeout(function() { self.apply(self, args); }, n * 1000); return function() { clearTimeout(id); }; } 1秒後に実行 va…