title: Show a div as pop-up using Fancybox
body: <p>I need to show a div with application form as a pop-up using fancybox. Is it possible to .fancybox() anything but image because all the tutorials i came across on the internet use . </p>
  
  <p>Thanks in advance!</p>
  
  <p>I have the following code:</p>
  
  <pre><code>&lt;input type="button" value="Preview" id="btnPreview" /&gt;
  </code></pre>
  
  <p></p>
  
  
      testen text!
  
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
  
          $('#divDetails').hide();
          $('#divPreview').hide();
  
          $('.image').click(function () {
              var imgPath = $(this).attr('src');
              var imgName = imgPath.substring(0, imgPath.length - 4);
              var imgAlt = $(this).attr('alt');
  
              $('#mainDiv').hide();
              $('#divDetails').show('slow');
  
              $('#detailedImage').attr('src', imgName + '-large.jpg').attr('alt', imgAlt);
          });
  
          $('#btnPreview').click(function () {
              $('#divDetails').show();
              $("#divPreview").fancybox();
          });
      })
  &lt;/script&gt;
  </code></pre>
  
  <p>The rest of the code is not relevant. when I click the btnPreview button I want the div with ID divPreview to pop-up and I call $("#divPreview").fancybox();</p>
  
  <p>I include these scripts</p>
  
  <pre><code>&lt;link href="../css/jquery.fancybox-1.3.4.css" rel="stylesheet" type="text/css" /&gt;
  &lt;script src="Scripts/jquery-1.6.2.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="../fancybox/jquery.fancybox-1.3.4.pack.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="../fancybox/jquery.mousewheel-3.0.4.pack.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="../fancybox/jquery.easing-1.3.pack.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thank you!!</p>