Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Question: Why does setting the width and height when the dialog is defined not affect the initial size of the dialog? </p> <p>Answer: It does... what browser are you using and version of jQuery.</p> <p>I cut/pasted your code from above into a small sample and it worked perfectly... I pasted the full sample below you can try it on your end.</p> <pre><code> &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt; &lt;title&gt;jQuery UI Example Page&lt;/title&gt; &lt;link type="text/css" href="css/ui-lightness/jquery-ui-1.8.11.custom.css" rel="stylesheet" /&gt; &lt;script type="text/javascript" src="js/jquery-1.5.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="js/jquery-ui-1.8.11.custom.min.js"&gt; &lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $(function() { $("#dialog-form").dialog({ autoOpen: false, maxWidth:600, maxHeight: 500, width: 600, height: 500, modal: true, buttons: { "Create": function() { $(this).dialog("close"); }, Cancel: function() { $(this).dialog("close"); } }, close: function() { } }); }); $("#create-appt") .button() .click(function() { $("#dialog-form").dialog("open"); }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;test&lt;/h1&gt; &lt;div id="dialog-form" title="Create Appointment"&gt; &lt;p&gt; this is my test &lt;/p&gt; &lt;/div&gt; &lt;input type="button" id="create-appt" value="test"/&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
 

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