Javascript jQuery移动加载
我想在我正在构建的站点的移动版本上的图像库上具有一些滑动功能,因此,由于我一直在使用jQuery,我想我应该使用jQuery mobileJavascript jQuery移动加载,javascript,jquery,html,css,jquery-mobile,Javascript,Jquery,Html,Css,Jquery Mobile,我想在我正在构建的站点的移动版本上的图像库上具有一些滑动功能,因此,由于我一直在使用jQuery,我想我应该使用jQuery mobileswipeleft和swiperight事件。这一切都很好,但我注意到,当页面加载时,页面上会出现“加载”一词 这是加载小部件吗?如果是这样,我如何设置它使其不显示?您可以通过以下方式将其关闭: $( document ).bind( 'mobileinit', function(){ $.mobile.loader.prototype.options
swipeleft
和swiperight
事件。这一切都很好,但我注意到,当页面加载时,页面上会出现“加载”一词
这是加载小部件吗?如果是这样,我如何设置它使其不显示?您可以通过以下方式将其关闭:
$( document ).bind( 'mobileinit', function(){
$.mobile.loader.prototype.options.text = "loading";
$.mobile.loader.prototype.options.textVisible = false;
$.mobile.loader.prototype.options.theme = "a";
$.mobile.loader.prototype.options.html = "";
});
在头内部初始化jQuery Mobile之前,必须先初始化该块,如下所示:
<!DOCTYPE html>
<html>
<head>
<title>jQM Complex Demo</title>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no; target-densityDpi=device-dpi"/>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://www.dragan-gaic.info/js/jquery-1.8.2.min.js"></script>
<script>
$( document ).bind( 'mobileinit', function(){
$.mobile.loader.prototype.options.text = "loading";
$.mobile.loader.prototype.options.textVisible = false;
$.mobile.loader.prototype.options.theme = "a";
$.mobile.loader.prototype.options.html = "";
});
</script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
jQM复杂演示
$(文档).bind('mobileinit',function(){
$.mobile.loader.prototype.options.text=“加载”;
$.mobile.loader.prototype.options.textVisible=false;
$.mobile.loader.prototype.options.theme=“a”;
$.mobile.loader.prototype.options.html=“”;
});
查找有关此功能的详细信息。尝试以下操作:
$(document).on("swiperight", "body", function() {
$.mobile.changePage("#page1");
$.mobile.hidePageLoadingMsg();
});
或
不管你怎么做,重要的是
$.mobile.hidePageLoadingMsg();
感谢@Gajotres在head标记中初始化jQuery Mobile之前给出的关于初始化块的答案和指针。
$.mobile.hidePageLoadingMsg();