我有这样奇怪jQueryUI的对话框错误
$('#add_error').click(function(e) {
$('<div>')
.load('/someaction/format/html/')
.dialog({
title: 'Some title',
modal: true,
width: 385,
close: function() {
$(this).remove();
}
});
e.preventDefault();
});
它工作正常创建对话框,但每三(如果没有它真的第三真正确定)时我点击链接打开的对话框时,出现在Firebug错误
“$(” “)addClass(” UI-插件叠加 “)是未定义”
在dialog.js即一段代码:
var $el = (this.oldInstances.length ? this.oldInstances.splice(0, 1)[0] : $('<div></div>').addClass('ui-widget-overlay'))
.appendTo(document.body)
.css({
width: this.width(),
height: this.height()
});
下创建:函数(对话框)方法。
奇怪的是,当我删除
close: function() {
$(this).remove();
}
任何想法不会发生这个错误?
哪些是你运行的JQuery/JQuery用户界面的版本? – 2010-03-05 07:24:16
最新的jQuery UI 1.8rc3 – umpirsky 2010-03-05 08:01:49