title: Display a loading bar before the entire page is loaded
body: <p>I would like to display a loading bar before the entire page is loaded. For now, I'm just using a small delay:</p>
  <pre><code>$(document).ready(function(){
      $('#page').fadeIn(2000);
  });
  </code></pre>
  <p>The page already uses jQuery.</p>
  <p>Note: I have tried this, but it didn't work for me: <a href="https://stackoverflow.com/questions/5245294/loading-bar-while-script-runs">loading bar while the script runs</a></p>
  <p>I also tried other solutions. In most cases, the page loads as usual, or the page won't load/display at all.</p>