English 中文(简体)
无用定时电话(围绕论点引述的错误)
原标题:Useless setTimeout call (missing quotes around argument?)

我在 j里有这部法典。

$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
    });
});

www.un.org/Depts/DGACM/index_spanish.htm

jQuery.fn.delay = function(time,func){
    return this.each(function(){
        setTimeout(func,time);
    });
};

现在我犯了错误:

无用装置 时间呼吁(围绕论点引用吗?)

FF3.x, 6+ 任何这方面的想法? 为什么会发生这种情况?

最佳回答

There already exists a jQuery-method delay and it expects a string(queueName) and not a function as parameter. Choose another name for your delay-method to avoid conflicts.

问题回答

I got same error when I wrote

setTimeout(updateStatus(), 5000);

而不是

setTimeout(updateStatus, 5000);

我同意施舍。 此外,我还有必要将信息传递给这一职能,并且为了简化使用:

setTimeout(function(){ updateStatus(myData) } , 5000);

论据必须是一种功能,而不是一种功能。 地球组织发现这一错误,因此,要走。

仅供参考的是,有人 st倒了这个问题,正在寻找可能的解决办法。 我拿到与最初的海报一样的错误信息,因为我正在编篡<条码>准时/代码>的论点令。

This:

setTimeout(25, function(){
    spotlight.intro.find( #intro ).ellipsis();  
});

......给了我错误的信息。 我将此职能改为:

setTimeout(function(){
    spotlight.intro.find( #intro ).ellipsis();
}, 25);

我的问题也得到解决。

问题在于3。 它没有适当处理某些元素=和;树中完全省略了元素,被忽略,因此我的原始问题。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签