I\'m using $.ajax() to populate a list in my mobile web app. What I\'d like to do is have the jQuery mobile loading spinner appears while this call is being performed and di
The problem here is that the call to $.ajax() happens within the control flow of the event handler (the caller).
A very simple way to decouple the ajax request from this control flow is to let setTimeout() invoke this function for you, like so:
setTimeout(function(){$.ajax( ... )}, 1);
You can then use the 'beforeSend' and 'complete' events of $.ajax() as stated before and be sure, that your spinner is showing up.