我有这样的事情:
var activityTextToggleTimerTwo = setInterval(function() {
active_users_text.toggleClass("active inactive bounce bounceOutUp")
var activityTextToggleTimerThree = setTimeout(function() {
active_users_text.toggleClass("active inactive bounce bounceOutUp");
}, 5000);
}, 25000);
我尝试像这样清除超时/间隔:
clearInterval( activityTextToggleTimerTwo );
clearTimeout( activityTextToggleTimerThree );
我得到一个例外:
Uncaught ReferenceError: activityTextToggleTimerThree is not defined
为什么?我也认为activityTextToggleTimerThree没有被清除..
谢谢