title: How to show Page Loading html file until the page has finished loading?
body: <p>I need a different page loader file (like: <code>loader.html</code>) in which i have only <code>loader.gif</code> image with some css styling not in the same <code>index.html</code> file. So now i want to load my <code>index.html</code> file before it loads i want to show my <code>loader.html</code> file and if my all content loaded hide the <code>loader.html</code> file and show <code>index.html</code> file content.
  Hope you understand what i am saying please help :)</p>
  
  <p>I tried this Code:</p>
  
  <pre><code>$(window).load(function(){
      if($("body").load("loader.html").fadeOut(5000)){
          $("loader.html").hide();
          $("index.html").show();
      }
  });
  </code></pre>