2010-11-18 102 views

回答

2

我想这是因为:

$.modal('selector'); 

不仅工作这应该工作:

$.modal($('selector')); 
+0

从一个关闭按钮点击事件,在弹出的标记,我调用$ .modal.close();明确。 – 2010-11-18 07:39:03

+0

Ok编辑回答相应 – 2010-11-18 07:41:56

+0

感谢marcus求助 – 2010-11-18 09:16:05

0

对于这一点,你必须关闭第一个这需要大约2后,打开第二弹出秒。所以,如果你使用settimeout()函数,并通过提供2秒或更大的延迟来调用第二个弹出窗口。它会工作。因为,这不是一个正确的方法。但它实际上适用于我。

我使用的简单模式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; 
    }); 
相关问题