我在jQuery中有这段代码片段
$element.parent().children().last().hide().show('slide', {direction : 'left'}, 700, function () {
$element.delay(2000, function() {
$element.parent().children().last().hide('slide', {direction: 'left'}, 700);
reload_table(question_number);
//delay ends here
});
});
delay
的声明如下:
jQuery.fn.delay = function(time,func){
return this.each(function(){
setTimeout(func,time);
});
};
现在我遇到了这个错误:
无用的 setTimeout 调用(参数周围缺少引号?)
FF3.x,Firefox 6+ 是可以的。对此有什么想法吗?为什么会发生这种情况?