title: how to show image when loading ajax
body: <p>i want to show image when ajax is loading the page then hide it again
  <br> then i try this code but the image don't show first all done at the same time ( the php page take about 3 seconds to load ) so when i remove the comment from the line <code>$("img").css("display","none");</code> the image never appear
  <br> here the full code</p>
  
  <pre><code>$(document).ready( function(){
      $("#al").click(function(){
          $("img").css("display","inline");
          xmlhttp=new XMLHttpRequest();
          xmlhttp.open("GET","ajax load.php",false);
          xmlhttp.send();
          document.getElementById("showhere").innerHTML=xmlhttp.responseText;
  //  $("img").css("display","none");
      });
  });
  </code></pre>