2017-04-10 5 views
0

ダイアログボックスの位置を設定することが可能かどうか、左から60px、次にその60pxから画面の右側に100%ということがありますか?jqueryダイアログボックスで位置と幅を設定することはできますか?

Hereis an image to be more clear of what I'm trying to do.

<button id="opener">Open Dialog</button> 
<div id="dialog" title="Basic dialog"> 
    <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> 
    <p> 
     <button id="opener2">Open a nested dialog</button> 
    </p> 
</div> 
<div id="dialog2" title="Nested dialog"> 
    <p>I would like this particular box to be positioned from the left, while the rest of the box extends to the right side of the window.</p> 
</div> 

    $("#opener").click(function() { 
    $("#dialog").dialog("open"); 
}); 
$("#dialog").dialog({ 
    autoOpen: false, 
    modal: false, 
    position: [0,63], 
    width: 283, 
    open: function (event, ui) { 
     $(".ui-dialog #opener2").click(function() { 
      $("#dialog2").dialog("open"); 
     }); 
    } 
}); 
    var w = $(window).width(); 

$("#dialog2").dialog({ 
    autoOpen: false, 
    modal: false, 
    position: [294,63], 

}); 

    .ui-widget-overlay { 
    background: rgba(0,0,0,0.9); 
} 

答えて

0

まず、私はあなたのソースコードをお知らせください。 ブートストラップを使用している場合は、次のようにします。

<div class="col-md-4"> 
Your basic dialog.. 
</div> 

<div class="col-md-8"> 
Your nested dialog box.. 
</div> 
+0

私が使用しているコードは次のとおりです... https://jsfiddle.net/2Q4bG/125/ – Light

+0

誰かお手伝いできますか? – Light

関連する問題