title: Loading Animation for large HTML Tables in Firefox
body: <p>i have a page with a really large table, and I would like to display a loading animation until the table is loaded. At the moment I'm using the following solution. Directly after <code>&lt;body&gt;</code> i have a div:</p>
  
  <pre><code>&lt;div id="loading"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And at the end of the page before <code>&lt;/body&gt;</code> I'm using the following JS:</p>
  
  <pre><code>$(document).ready(function(){
      $('#loading').fadeOut();
  });
  </code></pre>
  
  <p>The problem is, in firefox the page seems to be loaded completely before it is shown. So if I'm on a webpage and I click on a link to my table, firefox is just processing for some seconds and then the whole page with the table is shown. The "loading <code>&lt;div&gt;</code>" is just flashing very short - because then the page is loaded really fast. How can I fix that and show my loading div, while Firefox is processing the page?</p>