title: Closing fancybox2 modal with a button
body: <p>I have the following script:</p>
  
  <pre><code>&lt;script&gt;
  
  $(function() {
      $('#close-button').click(function(event) {
          $.fancybox.close(true);
      });
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm trying to have the fancybox2 modal close when a user clicks a custom close button (<code>forgetit_btn.jpg</code>).  This is what I have been trying to use:</p>
  
  <pre><code>&lt;img id="close-button" src="_assets/img/forgetit_btn.jpg" /&gt;
  </code></pre>
  
  <p>MORE INFORMATION:</p>
  
  <p>The following is the code that I use to call fancybox from page1.php</p>
  
  <pre><code>$(document).ready(function() {
    $(".various").fancybox({
      maxWidth    : '100%',
      maxHeight   : 600,
      fitToView   : false,
      width       : '90%',
      height      : '70%',
      autoSize    : false,
      closeClick  : false,
      openEffect  : 'none',
      closeEffect : 'none',
      scrolling   : 'no'
    });
  });
  </code></pre>
  
  <p>The following is the code on page1.php which opens the fancybox:</p>
  
  <pre><code>   &lt;a class="various fancybox.iframe" href="page2.php"&gt;Inactivate My Profile&lt;/a&gt;
  </code></pre>
  
  <p>The script at the very top of this post is on page2.php</p>