打开模态对话框上的关闭按钮后,如何触发选项卡打开?这是我到目前为止的代码,它只是以纯文本形式显示错误消息。
<script>
$(function() {
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );}}
});
$("#tabs").tabs("select",1);
return false;
});
});
</script>
<div id="dialog-message" title="Incorrect password">
The password you have provided is incorrect.<br>Please try again.
</div>
答案 0 :(得分:1)
从Hook into dialog close event修改
$('div#dialog-message').bind('dialogclose', function(event) {
$("#tabs").tabs("select",1);
});
或试试这个:
$( "#dialog-message" ).dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
},
close: function(){
$("#tabs").tabs("select",1);
}
});