title: How can I get a jquery ui dialog object?
body: <p>Say I have a dialog open that has no "id" how can I find the dialog and get the dialog object so I can do .dialog('close') on it?</p>
  
  <p>Example</p>
  
  <pre><code>// say if this was my dialog
  &lt;div&gt; 
     &lt;input type="button" id="btn" /&gt;
  &lt;/div&gt;
  
  $("#btn").parents("div").dialog('close');
  </code></pre>
  
  <p>This does not work though so I need to get the actual object.</p>