2011-04-25 31 views
0

我正在使用simplemodal-demo-basic-1.4.1,並且iam無法使用它在頁面上打開多個窗口(我不需要它們在相同的位置打開時間或者彼此重疊)。 我嘗試添加另一個類並在我的js文件中調用該類,但我沒有收到它。我確定我錯過了一些東西。可以幫忙嗎?簡單模態 - 多個

+0

請發佈您的代碼,並在可能的情況下鏈接到顯示您問題的頁面。 – 2011-04-25 01:37:43

+0

儘管我是忍者,但我不想闖入你的房子並竊取你的代碼來調試它。介意爲我做這件事嗎? – Blender 2011-04-25 01:38:07

+0

@Blender - 是的,但如果你有,有人會知道嗎? :P – 2011-04-25 01:40:14

回答

1

我假設你正在談論的demo available on the simplemodal Google Code project

這是我不得不做第二模態對話框添加到演示:

以下HTML添加到index.html的:

  • content DIV中:

    <!-- second modal content --> 
    <div id="basicTwo-modal-content"> 
        <h3>Basic Two Modal Dialog</h3> 
        <p>The Second Modal</p> 
    </div> 
    
  • basic-modal DIV中:

    <input type='button' name='basicTwo' value='Demo Two' class='basicTwo'/> or <a href='#' class='basicTwo'>Demo Two</a> 
    

添加以下CSS來basic.css:

#basicTwo-modal-content { display: none; } 

添加以下JavaScript對jQuery負載處理程序中basic.js:

$('#basic-modal .basicTwo').click(function (e) { 
     $('#basicTwo-modal-content').modal(); 

     return false; 
    }); 

Working Demo