我要實現我的應用程序超時功能。如何在我的情況下創建一個setTimeout?
我setTimsout
代碼似乎並沒有工作。它在我的控制檯中輸出'call here
'而不是等待3秒鐘。
誰能給我爲什麼發生這種情況的提示?謝謝!
main.prototype.init = function(){
var instance = this;
$('.test').each(function(){
//codes…..
window.setTimeout(instance.playAnimation(this), 3000)
});
}
main.prototype.play = function(item){
console.log('call here')
}