Home > Web Front-end > JS Tutorial > How to prevent jQuery Mobile from displaying the annoying loading interface_jquery

How to prevent jQuery Mobile from displaying the annoying loading interface_jquery

WBOY
Release: 2016-05-16 16:59:15
Original
1012 people have browsed it

A BUG of jQuery Mobile: When ajax and its own back are not used to return, that is: when the browser back button is clicked, the page will be loaded from the cache. At this time, the annoying loading animation comes out and never stops. disappear. I found many solutions on the Internet, but after searching for a long time, I couldn’t find any useful ones. Today, I suddenly thought of taking a step back and directly use the jqeury-mobile class library.

Open it with an editor and

found it. The method of displaying pageLoading, the definition of showPageLoadingMsg:

Then add a code, if("".length<5)return; to make this method invalid.

Copy code The code is as follows:

showPageLoadingMsg:function(){if("".length< ;5)return;

Save and refresh the test. Remember, it is best not to include Chinese characters, otherwise the encoding format of the JS file will need to be modified.

OK, solved.

But personally, if you need to use that method later, there is nothing you can do and it will not work. The solution can be: pollution, coupled global variable judgment, that is, setting a global variable, and performing an if judgment in this method to determine whether to force a return.

If you have any questions, please feel free to contact me. QQ: 551996458. Of course, I am also very good.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template