我创建 jQuery UI 对话,如果显示,当我点击它时关闭
$('#myDial').dialog({
autoOpen: false,
resizable: false,
width: 230,
height: 170,
modal: false,
open: function() {
window.closedialog = 1;
$(document).bind('click', function(){
if (window.closedialog) {
$('#myDial').dialog('close');
}
//set to one because click on dialog box sets to zero
window.closedialog = 1;
});
},
focus: function() {
window.closedialog = 0;
},
close: function() {
$(document).unbind('click');
}
})
行。
我的问题:当我点击退出时,对话框是否存在关闭它的任何方法或选项?