title: jQuery UI Dialog To Load HTML Title
body: <p>I'm using jQuery UI Dialog for pop-ups that read from external pages.  How do I get it to load the title from the external HTML instead of having the change it in the code every time?  Because I want different titles as well.</p>
  
  <p>Any suggestions please?</p>
  
  <pre><code>function openDialog(url) {
     $("&lt;div class='popupDialog'&gt;Loading...&lt;/div&gt;")
          .dialog({
              autoOpen: true,
              closeOnEscape: true,
              width: '900',
              height: '900',
              modal: true,
              title: 'Bonus Features',
              beforeClose: function(){   $(this).remove();   }
          }).bind('dialogclose', function() {
              jdialog.dialog('destroy');
          }).load(url, function() {
              $(this).dialog("option", "position", ['center', 'center'] );
          });
  
          adjustJQueryDialogOverlay();
      }
  
      $(window).resize(function() {
          $(".ui-dialog-content").dialog("option", "position", ['center', 'center']);
      });
  </code></pre>