Display a loading bar before the entire page is loaded
<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:</p>

<p><a href="http://stackoverflow.com/questions/5245294/loading-bar-while-script-runs">loading bar while script runs</a></p>

<p>I also tried other solutions. In most cases, the page loads as usually or the page won't load/display at all.</p>

<p>Thank you for any help.</p>
