title: How to remove JQuery Dialogs from the DOM
body: <p>I have run into a situation where I need to manually remove old dialogs before creating new ones. In another thread, the following method was suggested:</p>
  
  <pre><code>$('.ui-dialog').empty().remove();
  </code></pre>
  
  <p>And I think this would work, but I do have other dialogs that I do not want to remove from the DOM, and I think this method would get rid of all of them. Inspecting the page with Firebug shows that once JQuery creates a dialog out of the html you provide, it gives it standard wrapper divs, all with the same classes. These are:</p>
  
  <pre><code>ui-dialog ui-widget ui-widget-content ui-corner-all  ui-draggable
  </code></pre>
  
  <p>So they're pretty generic, and it's hard to find a unique characteristic about the outer wrapper classes that need to go. I'm trying to find a way to only remove the dialogs that I want to remove, and leave the others. Any ideas?</p>