title: Jquery UI Close Dialog & Open New Dialog
body: <p>The concept seems simple enough, yet i'm having a lot problems executing it.</p>
  
  <p>I need to close the current dialog and open another. It does close the #imageModal, but does not open the #uploadModal.</p>
  
  <p>Any suggestions?</p>
  
  <p>Edit: Added the #uploadModal</p>
  
  <pre><code>$("#imageModal").dialog({
      autoOpen: false,
      height: 500,
      width: 500,
      modal: true,
      closeOnEscape: true,
      resizable: false,
      buttons: {
          'Upload Image': function() {
              // CLOSE 1 DIALOG AND OPEN ANOTHER
              $(this).dialog('close');
              $('#uploadModal').dialog('open');
  
          },
          Cancel: function() {
              $(this).dialog('close');
          }
      },
      close: function() {
          $(this).dialog('close');
      }
  });
  
  
  $("#uploadModal").dialog({
      autoOpen: false,
      height: 500,
      width: 500,
      modal: true,
      closeOnEscape: true,
      resizable: false,
      buttons: {
          'Upload Image': function() {
  
  
          },
          Cancel: function() {
              $(this).dialog('close');
          }
      },
      close: function() {
          $(this).dialog('close');
      }
  });         
  </code></pre>