2

我第一次使用 jQuery Mobile 来制作它,这样我就可以滑回上一页,我已经设法开始工作了。

但是,我注意到屏幕底部有一条丑陋的“正在加载”消息。谷歌搜索后,我看到了一个名为的函数$.mobile.hidePageLoadingMsg();,我在其中添加了该函数,$(document).ready(function()但加载消息仍然存在。

我怎样才能摆脱这个消息?

干杯

4

3 回答 3

6

我通过使用 jquery 选择器并隐藏元素解决了这个问题,如下所示:

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

希望这可以帮助!

于 2014-02-20T14:48:01.537 回答
4

的正确用法$.mobile.hidePageLoadingMsg();是通过触发手动显示加载消息$.mobile.showPageLoadingMsg();

资料来源:JQM

在您的情况下,如果您想禁用此功能,请在加载 JQM之前<head>在标签中插入以下代码<script src="Jquery.mobile.1.2.0.js">

编码:

<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>
于 2013-03-07T16:19:01.587 回答
1

加载

如果以上是您正在谈论的问题,请确保您已加载样式表

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">
于 2014-03-05T13:41:26.303 回答