I was going to call an ajax funciton, and was looking through the api. I was curious if there is a function that can be carried out while waiting for the success, error, done, etc to be be called.
I was hoping there was something like :
$.ajax({
…,
waiting: function(){
//carry out some code
}
});
If it isnt in there already, it really should. Its not as smart in my mind to have to carry that stuff before the ajax function was called…
waiting could easily carry out something such as displaying a loading gif or something like that.
Is there anything out there that does this sort of functionality? I cant seem to find it.
Try this