I am trying to show the loader during asynchronous call, but loader is not display. This is what i have done so far.
$.ajax({
type : "POST",
url : 'http://demo.co.in/projects/demo/webservice/',
dataType : "json",
async : false,
beforeSend: function(){
$('#pageLoader').show( "slow", function() { });
$('#pageLoader').html('<img src="images/loader.gif" />');
},
success : function(data) {
},
error : function(jqXHR, textStatus, errorThrown) {
alert("Server timed out. Please try again.")
}
});
One thing i have notice so far, when i remove the async : false, from my code after that loader is display.