JQuery delay()不延迟

为什么立即将文本清空(忽略延迟)?
$('#error_Box_text').html('error text').delay(5000).html('')

#

jQuery 1.4

解决方法

延迟永远不会延迟常规方法 – 只有那些被推送到动画/效果链的人。如果要延迟您的html()调用,请使用queue( http://api.jquery.com/queue/):
$('#error_Box_text').html('error text').delay(5000).queue(function() {
   $(this).html('')
});

如果你能做的话会很好

$('#error_Box_text').html('error text').delay(5000,function() { $(this).html('') });

但这是不可能的(还)。

相关文章

页面搜索关键词突出 // 页面搜索关键词突出 $(function () {...
jQuery实时显示日期、时间 html: <span id=&quot...
jQuery 添加水印 <script src="../../../.....
中文:Sys.WebForms.PageRequestManagerParserErrorExceptio...
1. 用Response.Write方法 代码如下: Response.Write(&q...
Jquery实现按钮点击遮罩加载,处理完后恢复 思路: 1.点击按...