Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Hiya like this <strong>demo</strong> <a href="http://jsfiddle.net/mhLc5/6/" rel="nofollow">http://jsfiddle.net/mhLc5/6/</a> <strong>OR Updated Answer =></strong> this <a href="http://jsfiddle.net/Pb2eR/" rel="nofollow">http://jsfiddle.net/Pb2eR/</a> <strong>or</strong> <a href="http://jsfiddle.net/Pb2eR/1/" rel="nofollow">http://jsfiddle.net/Pb2eR/1/</a></p> <p><strong>Dynamic Append</strong> Demo: <a href="http://jsfiddle.net/Pb2eR/13/" rel="nofollow">http://jsfiddle.net/Pb2eR/13/</a></p> <p>SO to close the dialog you just need to call <code>.dialog('close')</code> rest a demo will give you a good place to play around.</p> <p>APIs reside here: <a href="http://jqueryui.com/demos/dialog/" rel="nofollow">http://jqueryui.com/demos/dialog/</a></p> <p>good read: <a href="http://forum.jquery.com/topic/close-a-jquery-ui-dialog-from-the-inside" rel="nofollow">http://forum.jquery.com/topic/close-a-jquery-ui-dialog-from-the-inside</a></p> <p>Hope this helps!</p> <p><strong>code</strong></p> <pre><code> buttons: { 'Submit': function() { $Dialog_div.dialog('close'); } </code></pre> <p><strong>Rest of the sample code</strong></p> <p>var $Dialog_div;</p> <pre><code>function fnOpenDialog() { $Dialog_div = $('&lt;div id=\'ThisDialog\'&gt;Hello Page 2&lt;/div&gt;').prependTo('body'); $Dialog_div = $('#ThisDialog').dialog({ autoOpen: true, draggable: true, resizable: true, title: 'Dialog stack overflow HULK', modal: true, stack: true, height: ($(window).height() * 0.95), width: ($(window).width() * 0.9), buttons: { 'Submit': function() { $Dialog_div.dialog('close'); } } }); } $('#ClickMe').click(fnOpenDialog);​ </code></pre>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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