$("#termSheetPrinted").dialog({
autoOpen: false,
resizable: true,
height: 800,
width: 950,
position: 'center',
title: 'Term Sheet',
close: function(event, ui) {
$(this).dialog("close");
},
modal: true,
buttons: {
"Print": function () {
$("#termSheetPrinted").jqprint();
},
"Cancel": function () {
$("#termSheetPrinted").html('');
$(this).dialog("close");
}
}
});
当我单击右上角的“x”时,Firefox 卡住、崩溃,并且没有任何反应。
我是否正确定义了关闭函数?
最佳答案
关闭时您有无限递归。 尝试这段代码看看它。
close: function(event, ui) { alert("close is called");
$(this).dialog("close");
},
你应该只有这个
close: function(event, ui) {
},
关于jquery-ui-dialog - JQuery 对话框在关闭时卡住,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5082024/