title: How to print a Hidden DIV when printing using a JavaScript Function
body: <p>I have a javascript print function:</p>
  
  <pre><code>    function printDetails() {
          var printContent = document.getElementById('&lt;%= divMail.ClientID %&gt;');
  
          var windowUrl = 'about:blank';
          var uniqueName = new Date();
          var windowName = 'Print' + uniqueName.getTime();
          var printWindow = window.open(windowUrl, windowName, 'left=500,top=500,width=0,height=0');
          printWindow.document.write(printContent.innerHTML);
  
          printWindow.document.close();
          printWindow.focus();
          printWindow.print();
  
          printWindow.close();
  
          return false;
      }
  </code></pre>
  
  <p>I have the following HTML:</p>
  
  <pre><code>&lt;div id="divMail" runat="server" &gt;
      &lt;div id="showTopDetailsContent" style="display: none; position:relative;"&gt;
          MORE HTML
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And the following JQuery/Script:</p>
  
  <pre><code>$('#showTopDetailsContent').toggle(300);
  </code></pre>
  
  <p>The problem:
  When I Print I get the Contents of the divMail (DIV) and send them to the Print Function, the problem is that since I have a DIV inside divMail that is Hidden it will not be displayed in the Print. How do I make the Print Function Display that hidden DIV?</p>