问题
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
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">
来源:https://stackoverflow.com/questions/15275933/jquery-mobile-loading-message