我想让我的jQuery UI对话框在5秒后关闭,但下面的代码不会做任何事情,有什么建议吗?我用alert("hellow")
测试了它,它确实工作正常,但下面的代码不起作用。使用setTimeout关闭jQuery UI()
success: function(data) {
$(data).dialog({
modal: true,
width: 900,
height: 600,
resizable: false,
title: thetitle,
draggable: false,
open: function(event, ui) {
setTimeout('$(this).dialog("close");', 5000);
}
});
为什么5秒后关闭我的对话框?它什么都不做。
感谢您的帮助,但实际上亚当rackis是正确的,但在settimeout函数内使用这个错误。非常感谢您的帮助 – 2011-12-18 01:29:59