jQuery Mobile - Loading Message [duplicate]

一笑奈何 提交于 2020-01-02 10:03:06

问题


I am using jQuery Mobile for the first time to make it so that I can swipe back to the previous page, which I have managed to get working.

However I have noticed a big ugly "loading" message at the bottom of the screen. After googling I have seen a function called $.mobile.hidePageLoadingMsg(); which I added inside my $(document).ready(function() but the loading message is still there.

How can I get rid of this message?

Cheers


回答1:


I solved the issue by using a jquery selector and hiding the element, like so:

$(document).ready( function() {
    $(".ui-loader").hide();
});

Hope this helps!




回答2:


The proper usage of $.mobile.hidePageLoadingMsg(); is to show the Loading Message manually by triggering $.mobile.showPageLoadingMsg();.

Source: JQM

In your case, if you want to disable this feature, insert the below code in <head> tag BEFORE loading JQM <script src="Jquery.mobile.1.2.0.js">

The code:

<head>
 <link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" />
 <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
 <!-- disable loading msg -->
 <script>
$(document).bind("mobileinit", function(){
 $.mobile.loadingMessage = false;
});
 </script>
<!-- / -->
 <script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script>
</head>



回答3:


loading

If the above is the issue you are talking about make sure you have the stylesheet loaded

&ltlink rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css"&gt


来源:https://stackoverflow.com/questions/15275933/jquery-mobile-loading-message

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!