我第一次使用jQuery Mobile来制作它,以便我可以刷回上一页,我已经设法开始工作。
但是我注意到屏幕底部有一条很难看的“加载”信息。谷歌搜索后,我看到了一个名为$.mobile.hidePageLoadingMsg();
的函数,我在$(document).ready(function()
中添加了这个函数,但加载消息仍在那里。
我怎样才能摆脱这条消息?
干杯
答案 0 :(得分:6)
我通过使用jquery选择器并隐藏元素解决了这个问题,如下所示:
$(document).ready( function() {
$(".ui-loader").hide();
});
希望这有帮助!
答案 1 :(得分:4)
正确使用$.mobile.hidePageLoadingMsg();
是通过触发$.mobile.showPageLoadingMsg();
手动显示加载消息。
来源:JQM
在您的情况下,如果您要停用此功能,请在<head>
标记中插入以下代码 BEFORE 加载JQM <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>
答案 2 :(得分:1)
如果以上是您要讨论的问题,请确保已加载样式表
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">