How can I show the 'loading' pop up after I click on the submit button for jQuery Mobile?
I'm using the jQuery Mobile javascript library. In my form, I can't seem to acheive what t开发者_开发技巧his form is doing. After I click on the Submit button. I want the user to see the 'loading' pop up.
Imporant
Please note the following comment by Michael Kariv:
deprecated, at least in jqm 1.3.2, may be earlier. looking into the code reveals
showPageLoadingMsg: function( theme, msgText, textonly ) {
$.mobile.loading('show', theme, msgText, textonly );
}
The original answer was:
$('#yourform').submit(function(){
$.mobile.showPageLoadingMsg(); // http://jquerymobile.com/test/docs/api/methods.html
})
Hiding the message again: $.mobile.hidePageLoadingMsg();
精彩评论