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
i want to know how i can display a loading image while calling new content
i have tried following code
<a href="javascript:void(0);" onclick="getSummary(1)" class="mini-blk"><i class="icon-refresh"></i> Show More</a>
<div id="summary"></div>
<script>
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();
}
});
}
</script>