title: jquery dialog height & width issue
body: <p>initially i am showing jquery dialog with fixed height and width at center of page. now i want to put a div with lots of html content inside the dialog. now i want to dynamically increase dialog height &amp; width according to the div height &amp; width with animate function but i want that dialog should stick at the center of page. </p>
  
  <p>when dialog open first time at center of page and later if i change the height &amp; width then dialog is not position at the center of page. so help me with concept that how to force dialog stick at center of page when height &amp; width will be increasing with animate function.</p>
  
  <h2>this way i am working with dialog....here is my small code</h2>
  
  <pre><code> $(document).ready(function () {
  
           $("#dialog").dialog({
               autoOpen: false,
               bgiframe: true,
               height: 85,
               width: 330,
               modal: false,
               draggable: true,
               resizable: false,
               position: 'center',
               show: {
                   effect: "fade",
                   duration: 1000
               },
               hide: {
                   effect: "fade",
                   duration: 500
               },
               open: function (type, data) {
                   $(this).parent().appendTo("form");
               }
           });
           });
  </code></pre>
  
  <p>if possible then please show me the trick with sample code. thanks</p>