title: jQuery fancybox destroying object on close
body: <p>I have a set of DIVs I intend to display inside a fancybox on click. The fancybox successfully fetches the element and its contents; however, when I click the cancel button to close the fancybox or click outside the fancybox so it can disappear, it disappears and abducts the element along with it i.e. removes the element from the DOM entirely. I have tried applying the keys from <a href="http://fancyapps.com/fancybox/#docs" rel="nofollow">here</a> but none of them is active or effects the changes therein.</p>
  
  <p>I'm thinking of maybe storing a copy of that element in a variable when the fancybox plugin is called (<code>using beforeLoad</code>) and doing a <code>insertBefore</code> in the <code>afterClose</code> key but nothing works (including the <code>leftRatio</code> properties).</p>
  
  <p>I've tried working with quoted and unquoted keys. I use v2.1.5 and also added v1.3.4 for the easing but it doesn't work even if when I omit the possibly extraneous version. My code looks something like this</p>
  
  <pre><code>$(document).ready(function() {
      $(".new-post a[href*='#fancy']").fancybox({
          'hideOnContentClick': false,
          'transitionIn': 'fade',
          'transitionOut': 'elastic',
          'speedIn': 1400,
          'speedOut': 300,
          'overlayShow': false,
          'autoCenter': true,
          'padding': [0, 0, 0, 20%],
          'margin': [0, 0, 0, 20%],
          'leftRatio': 1
      });
  });
  
  $(".more").click(function() {
      $("#fancy_outer").css({ "float": "right", "position": "static" }); /* I tried this also -_- */
      var that = $(this),
          id = $(that).parent().attr("id");
      console.log($(that)[0].nodeName);
      //use var that inside another object
  });
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>My new script using colorbox</p>
  
  <pre><code>  $(document).ready(function() {
    $(".new-post a[href*='#colorbox']").colorbox();
    });
  </code></pre>
  
  <p><em>Markup</em>
              
                        
                         <br>
                           Then Go Even Deeper And Narrower </p>
                          </p>
  
  <pre><code>            A young Eritrean man in his early twenties has two nephews and      one niece but is particularly fond of the niece; partly because they both share              similar traits
                                  and temperaments. During each visit to her parents' home, they spend the most time together, with her clinging unto him. Her pud...&lt;/p&gt;
                 &lt;/div&gt;
                 &lt;a href="#colorbox22" class="cboxElement"&gt;
                 &lt;div class="more"&gt; More »&lt;/div&gt; &lt;/a&gt;
                 &lt;div class="push"&gt; &lt;a href="#"&gt; push &lt;/a&gt;&lt;/div&gt;
          &lt;/div&gt;
  </code></pre>