Ajax loading info using beforeSend
by Prakash[ Edit ] 2013-09-06 10:44:04
We can show the loading info while the ajax request is fetching response from the server. As shown in the following code we can show Jquery Ajax loading info using beforeSend
$.ajax({//Make the Ajax Request
type: "GET",
url: "notifications/loadajax.php",
data: "lastid="+last_msg_id,
beforeSend: function() {
$('a.load_more').html('Loading...');//Loading info during the Ajax Request
},
success: function(html){
//ajax success process.
}
});