title: JQuery UI Multiple Dialog Issue
body: <p>I have functionality where I dynamically create Dialog. Some time I require Modal or Confirm Dialog</p>
  
  <p>So I created to Function  </p>
  
  <pre><code>function createDialogWithOutClose()
  {
      jQuery('#divPopup').dialog('destroy');
  
      var dialog = jQuery('#divPopup').dialog({
          autoOpen: false,
          height: 450,
          width: 650,
          modal: true,
          open: function(event, ui){
              jQuery('body').css('overflow','hidden');
          }
  
      });
  
      jQuery('#divPopup').dialog('open');
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>function createConfirmDialog(url,params)
  {
      jQuery('#divPopup').dialog('destroy');
  
      var dialog = jQuery('#divPopup').dialog({
          autoOpen: false,
          resizable: false,
          modal: true,
          show: "blind",
          hide: "explode",
          open: function(event, ui){
              jQuery('body').css('overflow','hidden');
          },
          buttons: {
              Ok: function() {
                  jQuery( this ).dialog( "close" );
                  jQuery.ajax({
                      type: "POST",
                      url: url,
                      data: params
                  });
              },
              Cancel: function() {
                  jQuery( this ).dialog( "close" );
              }
          }
  
      });
  
      jQuery('#divPopup').dialog('open');
  
  }
  </code></pre>
  
  <p>Problem here is when I give call to this function, It opens previously opened Dialog.</p>
  
  <p>I guess previous instance is not get removed.It doesnt dynamically create Dialog</p>
  
  <p>Any solution??</p>