Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jquery-ui/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/68.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery ui 如何避免页面之间的闪烁_Jquery Ui_Jquery_Jquery Mobile_Flicker - Fatal编程技术网

Jquery ui 如何避免页面之间的闪烁

Jquery ui 如何避免页面之间的闪烁,jquery-ui,jquery,jquery-mobile,flicker,Jquery Ui,Jquery,Jquery Mobile,Flicker,我正在使用jquery mobile和html5。 当我从一个页面重定向到另一个页面时,会看到一个白色屏幕(闪烁)。 那么如何摆脱这个问题呢 这是我的密码。。 --第1页-- 登录 /*********页面绑定evnet--开始--********/ $(document).bind(“pageinit”,函数(){ $(“#登录”)。解除绑定(“单击”)。单击(函数(){ 登录(); }); }); /*********页面绑定evnet--结束--********/ var类型; var数

我正在使用jquery mobile和html5。 当我从一个页面重定向到另一个页面时,会看到一个白色屏幕(闪烁)。 那么如何摆脱这个问题呢

这是我的密码。。 --第1页--


登录
/*********页面绑定evnet--开始--********/
$(document).bind(“pageinit”,函数(){
$(“#登录”)。解除绑定(“单击”)。单击(函数(){
登录();
});
});
/*********页面绑定evnet--结束--********/
var类型;
var数据;
var-Url;
var数据类型;
var内容类型;
var过程数据;
var方法;
jQuery.support.cors=true
函数登录(){
Type=“POST”;
Url=“/login”;
数据={};
DataType=“JSON”;
ContentType=“application/json;charset=UTF-8”;
ProcessData=true;
CallLoginService();
}
函数CallLoginService(){
$.ajax({
类型:类型,
数据:数据,
数据类型:数据类型,
processData:processData,
url:url,
contentType:contentType,
跨域:是的,
成功:函数(jsonObj){
如果(jsonObj.GetLoginResult[0]。状态==“true”){
$(location.attr('href','City.html');
}
else if(jsonObj.GetLoginResult[0]。状态==“无效用户名”){
batherRorMsg(jsonObj.GetLoginResult[0]。消息“#alertcontainer1”);
}
否则{
batherRorMsg(jsonObj.GetLoginResult[0]。消息“#alertcontainer1”);
}
},
错误:函数(响应){
检查网络();
}
});
登录
版权所有®;2013

第2页--(city.html)第二页

<html> 
   <head>
  <link href="css/jquery.mobile-1.3.1.css" rel="stylesheet"  type="text/css"/>
  <script src="js/jquery-1.10.1.js" type="text/javascript"></script>  
  <script src="js/jquery.mobile-1.3.1.js" type="text/javascript"></script>
   <script type="text/javascript">
     /*********Page bind evnet --start--********/
     $(document).bind("pageinit", function () {
       //code
   });
     /*********Page bind evnet --Ends--********/
  </head>
  <body>
  //code
  </body>
  </html>

/*********页面绑定evnet--开始--********/
$(document).bind(“pageinit”,函数(){
//代码
});
/*********页面绑定evnet--结束--********/
//代码

您在哪个浏览器上测试了此功能?可能是第二页的//代码太慢。可能是浏览器太旧,或者没有很好的支持,可能是设备太慢。请尝试删除页面转换。我在BB10设备(chrome浏览器)中部署了此应用。
<html> 
   <head>
  <link href="css/jquery.mobile-1.3.1.css" rel="stylesheet"  type="text/css"/>
  <script src="js/jquery-1.10.1.js" type="text/javascript"></script>  
  <script src="js/jquery.mobile-1.3.1.js" type="text/javascript"></script>
   <script type="text/javascript">
     /*********Page bind evnet --start--********/
     $(document).bind("pageinit", function () {
       //code
   });
     /*********Page bind evnet --Ends--********/
  </head>
  <body>
  //code
  </body>
  </html>