Jquery ui ERIC MARTIN简单模式窗口关闭事件在我显示另一个对话框弹出窗口时不起作用。。。。?

Jquery ui ERIC MARTIN简单模式窗口关闭事件在我显示另一个对话框弹出窗口时不起作用。。。。?,jquery-ui,simplemodal,Jquery Ui,Simplemodal,我使用简单模式窗口在模式窗口弹出窗口上显示动态内容(表)。当我只是在模式窗口中显示数据时,close事件工作正常 但是,如果在关闭jquery弹出对话框之后,在简单模式窗口上显示另一个jquery对话框弹出,那么我的简单模式窗口弹出onClose事件将不起作用 // Base Modal popup $('#simple').modal({ onShow: function() { alert("activated"); },

我使用简单模式窗口在模式窗口弹出窗口上显示动态内容(表)。当我只是在模式窗口中显示数据时,close事件工作正常

但是,如果在关闭jquery弹出对话框之后,在简单模式窗口上显示另一个jquery对话框弹出,那么我的简单模式窗口弹出onClose事件将不起作用

   // Base Modal popup
   $('#simple').modal({
       onShow: function() { 
           alert("activated"); 
       },
       onClose: function() {
           alert("deactivated");
           $.modal.close(); 
       }
   });

   // Jquery popup
   $('#kick').dialog({
       //ajax calls to show data  
   });
即使在使用
$.modal.close()时,close事件第二次也不起作用

请请帮帮我。。。我已经花了一天的时间在这个…

上,只是一些想法,因为我在这台计算机上没有VS2010,无法确认实际语法:(

不过,这就是我们关闭对话框的方式:

$(this).dialog("close"); 
那么这可能行得通

$(this).modal("close"); 

为此,您必须在关闭第一个弹出窗口后打开第二个弹出窗口,这大约需要2秒。因此,如果您使用settimeout()函数并通过提供2秒或更大的延迟来调用第二个弹出窗口,它将起作用。因为,这不是一种正确的方式。但它实际上对我有效

我正在使用Simple modal jquery插件:以下是代码:

$('#forgot_password_modal').click(function (e) {
$.modal.close(); // this is written to close all the popups.
setTimeout(function(){
    $('#forgot_password_form').modal({   //to open a second popup
        minHeight:570,
        minWidth:600,
        maxWidth:671,
        opacity: 90,
    onOpen: function(dialog) {
            dialog.overlay.fadeIn('slow', function() {
                dialog.data.hide();
                dialog.container.fadeIn('slow', function() {
                    dialog.data.slideDown('slow');

                });
            });
        },
        onClose: function(dialog) {
            dialog.data.fadeOut('slow', function() {
                dialog.container.slideUp('slow', function() {
                    dialog.overlay.fadeOut('slow', function() {
                        $.modal.close(); // must call this!
                    });
                });
            });
        }});
}, 2000);    
    return false;
});
$(“#基本模态内容”).modal({onShow:function(){alert(“before show”);},onClose:function(){alert(“before close”);var a=this;a.close();});
     // I get rid of this

            $("#basic-modal-content").modal( {
    onShow : function() {
          // anything you want to do before 
               },
    onClose : function() {
        // when closing popup anything you wanna do 
        var a = this;
        a.close();
    }

    });
$('#forgot_password_modal').click(function (e) {
$.modal.close(); // this is written to close all the popups.
setTimeout(function(){
    $('#forgot_password_form').modal({   //to open a second popup
        minHeight:570,
        minWidth:600,
        maxWidth:671,
        opacity: 90,
    onOpen: function(dialog) {
            dialog.overlay.fadeIn('slow', function() {
                dialog.data.hide();
                dialog.container.fadeIn('slow', function() {
                    dialog.data.slideDown('slow');

                });
            });
        },
        onClose: function(dialog) {
            dialog.data.fadeOut('slow', function() {
                dialog.container.slideUp('slow', function() {
                    dialog.overlay.fadeOut('slow', function() {
                        $.modal.close(); // must call this!
                    });
                });
            });
        }});
}, 2000);    
    return false;
});