title: Load gif until full page load
body: <p>I'm using this for my site to display a loading gif until my page is loaded.</p>
  
  <p>It's kinda working. </p>
  
  <pre><code>$(window).load(function(){
      $('#overlay').fadeOut();
  });
  </code></pre>
  
  <p>The HTML: </p>
  
  <pre><code>&lt;div id="overlay"&gt;
       &lt;img src="loading.gif" alt="Loading" /&gt;
       Loading...
  &lt;/div&gt;
  </code></pre>
  
  <p>But, the gif disappears to soon. My images aren't fully loaded yet when the loading gif disappears. How do I have to edit this code so it will show the loading gif until EVERYTHING is loaded on my page? </p>