title: How to use fancybox dialog plugin to display a div directly
body: <p>I have a javascript function called confirm() that that uses the JQuery UI library to open dialogs.</p>
  
  <p>For example:</p>
  
  <pre><code>jQuery('#confirm-popup').dialog('open'); 
  </code></pre>
  
  <p>This opens up and renders a div with id <code>confirm-popup</code>. I would like to switch to fancybox as it has an elastic effect that I need. So I was hoping that the following would work after I installed fancybox.</p>
  
  <pre><code>jQuery('confirm-popup').fancybox();
  </code></pre>
  
  <p>This doesn't appear to work. As far as I can see you can only call the <code>fancybox()</code> function on an anchor tag. I don't want to use anchor tags, as this would involve a lot of code changes for me as I have already mapped my confirm function to these tags.</p>
  
  <p>Ideally I would like to just grab the div element and show it in a similar way to the jQuery UI dialog method? Is there a way of doing this with Fancybox?</p>