2014-06-27 35 views
2

當涉及到使用幾個模態對話框時,似乎有一個最後版本的jQueryUI(1.11)的問題。jQueryUI 1.11多模態對話框不工作

我所試圖實現的是以下內容:我有兩個模式對話框,第一個包含一個按鈕,應打開第二個對話框:

HTML

<div id="test1"> 
    Test 1 
    <button id="open_test2">Open Test 2</button> 
</div> 

<div id="test2"> 
    Test 2 
</div> 

JS

$(function() { 
    $('#test1').dialog({ 
     autoOpen: true, 
     modal: true 
    }); 
    $('#test2').dialog({ 
     autoOpen: false, 
     modal: true, 
     position: { 
      my: "right top", at: "right top", of: window 
     } 
    }); 

    $('#open_test2').click(function() { 
     $('#test2').dialog('open'); 
    }); 
}) 

一旦第二個對話框打開,我仍然可以點擊第一次對話!

這裏是一個小提琴一個鏈接,顯示了我想實現: http://jsfiddle.net/JC4t5/1/

非常感謝提前對你的幫助!

+0

您是否閱讀過[1.11升級指南](http://jqueryui.com/upgrade-guide/1.11/)?您可能必須使用新引入的[appendTo](http://api.jqueryui.com/dialog/#option-appendTo)選項。 –

+0

@FrédéricHamidi無論更新如何,我仍然能夠看到問題。您可以通過更改OP中的小提琴來幫助您,並在更新中解釋如何解決此問題 – Deeptechtons

回答

1

這已經修復了jQuery UI 1.11.2版本。

相關問題