Jquery UI Close Dialog&打开新对话框 [英] Jquery UI Close Dialog & Open New Dialog
本文介绍了Jquery UI Close Dialog&打开新对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这个概念看起来很简单,但是我执行过很多问题。
The concept seems simple enough, yet i'm having a lot problems executing it.
我需要关闭当前对话框并打开另一个对话框。它关闭#imageModal,但是不打开#uploadModal。
I need to close the current dialog and open another. It does close the #imageModal, but does not open the #uploadModal.
任何建议?
编辑:添加了#uploadModal
Added the #uploadModal
$("#imageModal").dialog({
autoOpen: false,
height: 500,
width: 500,
modal: true,
closeOnEscape: true,
resizable: false,
buttons: {
'Upload Image': function() {
// CLOSE 1 DIALOG AND OPEN ANOTHER
$(this).dialog('close');
$('#uploadModal').dialog('open');
},
Cancel: function() {
$(this).dialog('close');
}
},
close: function() {
$(this).dialog('close');
}
});
$("#uploadModal").dialog({
autoOpen: false,
height: 500,
width: 500,
modal: true,
closeOnEscape: true,
resizable: false,
buttons: {
'Upload Image': function() {
},
Cancel: function() {
$(this).dialog('close');
}
},
close: function() {
$(this).dialog('close');
}
});
推荐答案
使用对话框中执行的回调函数完成他的任务。
Use the callback function that is executed when the dialog has finished his task.
[...]
'Upload Image': function() {
// CLOSE 1 DIALOG AND OPEN ANOTHER
$(this).dialog('close', function() {
$('#uploadModal').dialog('open');
});
},
[...]
这篇关于Jquery UI Close Dialog&打开新对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文