Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Part1:</h2> <p>Specifies where the dialog should be displayed. Possible values: 1) a single string representing position within viewport: 'center', 'left', 'right', 'top', 'bottom'. 2) an array containing an x,y coordinate pair in pixel offset from left, top corner of viewport (e.g. [350,100]) 3) an array containing x,y position string values (e.g. ['right','top'] for top right corner). Code examples</p> <p>Initialize a dialog with the position option specified.</p> <pre><code>$( ".selector" ).dialog({ position: "top" }); </code></pre> <p>Get or set the position option, after init.</p> <pre><code>//getter var position = $( ".selector" ).dialog( "option", "position" ); //setter $( ".selector" ).dialog( "option", "position", "top" ); </code></pre> <h2>Part2:</h2> <p>Setting the <a href="http://jqueryui.com/demos/dialog/#option-position" rel="nofollow"><code>position</code> option</a> will force this, so just use the same selector covering all your dialogs where I use <code>#dialog</code> here (if it doesn't find them no action is taken, like all jQuery):</p> <pre><code>$(window).resize(function() { $("#dialog").dialog("option", "position", "center"); }); </code></pre> <p><a href="http://jsfiddle.net/39GqM/" rel="nofollow">Here's that same jQuery UI demo page adding only the code above</a>, we're just adding a handler to the window's <code>resize</code> event with <a href="http://api.jquery.com/resize/" rel="nofollow"><code>.resize()</code></a>, so it triggers the re-center at the appropriate time. ​</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload