title: How to close Fancybox from a button click?
body: <p>I know there is a lot of topics with this questions, but I don't found the answer to my particular question ...</p>
  
  <p>Refer to the FAQ, we had to use one of these to close the fancybox.</p>
  
  <pre><code>$.fancybox.close();
  </code></pre>
  
  <p>or </p>
  
  <pre><code>parent.$.fancybox.close();
  </code></pre>
  
  <p>But this doesn't work in my case.</p>
  
  <p>I use an AJAX type of fancybox, see below :</p>
  
  <pre><code>  $('.fancybox2').fancybox({
  
              type: 'ajax',
              title: 'Admin',
              maxWidth    : 800,
              maxHeight   : 400,
              fitToView   : false,
              width       : '70%',
              height      : '70%',
              autoSize    : false,
              closeClick  : false,
              openEffect  : 'elastic',
              closeEffect : 'none',
          });
  </code></pre>
  
  <p>So after the click on a button, it shows another page in the fancybox.
  In this page there is a button with the following code :</p>
  
  <pre><code>&lt;input type=button onclick="$.fancybox.close();" value="Save" style="margin-top:30px;" class=button&gt;
  </code></pre>