title: Want to display loading bar while load php file in jquery
body: <p>i use a javascript jquery code to call a simple php file to display content. i have a show more link when i click there then new content load. all is working good. i just want to display a loading bar or loading image while getting new data</p>
  
  <p>i want to know how i can display a loading image while calling new content</p>
  
  <p>i have tried following code</p>
  
  <pre><code>&lt;a href="javascript:void(0);" onclick="getSummary(1)" class="mini-blk"&gt;&lt;i class="icon-refresh"&gt;&lt;/i&gt; Show More&lt;/a&gt;
  
  &lt;div id="summary"&gt;&lt;/div&gt;
  
  &lt;script&gt;
  
  function getSummary(id)
  {
     $.ajax({
  
       type: "GET",
       url: 'ajax_more.php',
       data: "id=" + id, // appears as $_GET['id'] @ ur backend side
       success: function(data) {
             // data is ur summary
            $('#summary').html(data);
            $('#friendsugMain').hide(); 
       }
  
     });
  
  }
  &lt;/script&gt;
  </code></pre>