开发者

How can I show the 'loading' pop up after I click on the submit button for jQuery Mobile?

开发者 https://www.devze.com 2023-04-12 23:44 出处:网络
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\'

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();

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号