How to Prevent jQuery Mobile from displaying a loading Interface

Source: Internet
Author: User

A bug in jQuery Mobile: When ajax and its own back are not used, that is, when you click the back button of the browser, the page will be loaded from the cache, the annoying loading animation never disappears. I found a lot of solutions on the internet, and I haven't been able to use them for a long time. Today I suddenly think of a base-payment method, and I directly moved to the jqeury-mobile class library.

Open in editor,

Find the method for displaying pageLoading, where showPageLoadingMsg is defined:

Then add the code, if ("". length <5) return; to invalidate this method.
Copy codeThe Code is as follows:
ShowPageLoadingMsg: function () {if ("". length <5) return;

Save and refresh the test. Remember not to show Chinese characters; otherwise, you need to modify the encoding format of the JS file.

OK.

However, I personally think that if the method needs to be used later, there is no way to do it. The solution can be: pollution, coupled global variable judgment, that is, to set a global variable, In this method, if judgment, whether to force return.

If you have any questions, contact me. QQ: 551996458. Of course, I am also a dish.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.