title: Display a loading gif in a div until div loads content from other page
body: <p>I am loading a page  mypage.php and in div1 I include example.php from the same server.</p>
  
  <p>The script is :</p>
  
  <pre><code>    &lt;script&gt;
  $(document).ready(function(){
  
      $("#div1").load("example.php");
    });
  
  &lt;/script&gt;  
  </code></pre>
  
  <p>How can I add a loading.gif in  while example.php is loading the content?
  I want to show the loading.gif only until the content loads.</p>