title: How to Make FancyBox not hide original inline block
body: <p>I'm trying to use Fancybox to "expand" an inline element on a page to make it easier to read. In it's original position the element is visible, but styled to show in a small scrolling box. Under that is an Expand link. Clicking the link invokes Fancybox to put the element into a Fancybox.</p>
  
  <p>That all works fine.</p>
  
  <p>But when you click close, it puts the original element back where it was, but it adds style="display:none" to the element as an attribute, causing the text to disappear.</p>
  
  <p>Here's a minimum case example that shows what happens.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;title&gt;Fancy Box data test&lt;/title&gt;
      &lt;meta name="generator" content="BBEdit 10.5" /&gt;
      &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="fancybox/source/jquery.fancybox.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="fancybox/source/jquery.fancybox.pack.js"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css" type="text/css" media="screen" /&gt;
      &lt;script type="text/javascript" &gt;
          jQuery.noConflict();
          jQuery(document).ready( function() {
              jQuery("a#inline").fancybox(
                  {
                  'hideOnContentClick': true
                  })
              }
          );
      &lt;/script&gt;
      &lt;style type="text/css"&gt;
          .agreement-content { 
              overflow:auto; 
              height:12em; 
              padding:10px; 
              background-color:#fbfaf6; 
              border:1px solid #bbb6a5; 
              width: 300px;
              margin: 30px;
              }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;
  This is testing having FancyBox "expand" a custom field.
  &lt;p&gt;
  
  &lt;div class="agreement-content"&gt;
      &lt;div id="lightCoH"&gt;
  &lt;p&gt;
      Supported neglected met she therefore unwilling discovery remainder. Way sentiments two indulgence uncommonly own. Diminution to frequently sentiments he connection continuing indulgence. An my exquisite conveying up defective. Shameless see the tolerably how continued. She enable men twenty elinor points appear. Whose merry ten yet was men seven ought balls. 
  &lt;/p&gt;
  
  &lt;p&gt;
  Blind would equal while oh mr do style. Lain led and fact none. One preferred sportsmen resolving the happiness continued. High at of in loud rich true. Oh conveying do immediate acuteness in he. Equally welcome her set nothing has gravity whether parties. Fertile suppose shyness mr up pointed in staying on respect. 
  &lt;/p&gt;
  
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;a id="inline" href="#lightCoH"&gt;Expand&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Looking at the source in Chrome's developer tools elements view you can watch it change the <code>&lt;div id="lightCoH"&gt;</code>.</p>
  
  <p>When the page loads it like the source above. </p>
  
  <p>When you click the expand link, it becomes <code>&lt;div class="fancybox-placeholder" style="display: none;"&gt;&lt;/div&gt;</code></p>
  
  <p>When you close the fancy box it becomes <code>&lt;div id="lightCoH" style="display: none;"&gt;</code></p>
  
  <p>I've tried putting an empty style attribute in, thinking it would pick that up and reset it to its original setting, but no luck.</p>
  
  <p>Maybe this is how Fancybox is stuppose to work - only with invisible inline elements. If so is there a work around, perhaps using the afterClose call back?</p>