Javascript Phonegap/jQuery移动页面转换闪烁
我是Phonegap/jQuery mobile的新手,在页面转换过程中遇到了白屏问题。我曾尝试应用我在web上找到的许多解决方案(例如Javascript Phonegap/jQuery移动页面转换闪烁,javascript,android,jquery,cordova,jquery-mobile,Javascript,Android,Jquery,Cordova,Jquery Mobile,我是Phonegap/jQuery mobile的新手,在页面转换过程中遇到了白屏问题。我曾尝试应用我在web上找到的许多解决方案(例如-webkit backface visibility:hidden;),但仍然没有解决这个问题 我还将defaultPageTransition设置为none(在jQuery mobile.js文件中),但仍然没有设置任何内容 我不能关闭硬件加速功能,因为我的iDangerousswiper菜单需要它。我的所有链接如下所示: <a href='javas
-webkit backface visibility:hidden;
),但仍然没有解决这个问题
我还将defaultPageTransition
设置为none
(在jQuery mobile.js文件中),但仍然没有设置任何内容
我不能关闭硬件加速功能,因为我的iDangerousswiper菜单需要它。我的所有链接如下所示:
<a href='javascript:void(0)' class='news-main' onclick='someFunction()'>Some String</a>
function someFunction(){
//setting some value that I need in next page
window.sessionStorage.setItem("someValue",someValue);
window.location="next-page.html";
}
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).bind("mobileinit", function()
{
if (navigator.userAgent.indexOf("Android") != -1)
{
$.mobile.defaultPageTransition = 'none';
$.mobile.defaultDialogTransition = 'none';
}
});
</script>
<script src="js/jquery.mobile-1.3.2.min.js" type="text/javascript"></script>
除了页面转换时的白色闪光灯外,一切正常。而且它只在某些设备上显示(例如Android 4+)
有没有办法解决这个问题?或者我做错了什么?提前谢谢 试试下面的方法
<a href='#' class='news-main' id='mylink'>Some String</a>
尝试如下
<a href='#' class='news-main' id='mylink'>Some String</a>
你可以把你的链接写成
<a href='javascript:void(0)' class='news-main' onclick='someFunction()' data-transition="none" >Some String</a>
由于jquery mobile在页面转换中不是很流畅。因此,我们可以选择关闭它们,直到发布具有正常页面转换的最新版本的jquery mobile。您可以将链接编写为
<a href='javascript:void(0)' class='news-main' onclick='someFunction()' data-transition="none" >Some String</a>
由于jquery mobile在页面转换方面不是很平稳。因此,我们可以选择暂时关闭它们,直到发布具有正常页面转换的最新版本的jquery mobile。为更高的Android目标构建时,Android:hardwareAccelerated隐式设置为true,这会导致在使用jQuery Mobile进行转换时闪烁 将其设置为android:hardwareAccelerated=“false”将解决此问题。 (我还禁用了缩放和用户可缩放功能)
当构建更高的Android目标时,Android:hardwareAccelerated被隐式设置为true,这会导致在使用jQuery Mobile进行转换时闪烁 将其设置为android:hardwareAccelerated=“false”将解决此问题。 (我还禁用了缩放和用户可缩放功能) 打开清单并将其粘贴到应用程序标记中。因为你的设备硬件每次都会加速通话
打开清单并将其粘贴到应用程序标记中。因为您的设备硬件每次都会加速呼叫在呼叫之前,您需要一些东西Jquery mobile js执行以下操作:
<a href='javascript:void(0)' class='news-main' onclick='someFunction()'>Some String</a>
function someFunction(){
//setting some value that I need in next page
window.sessionStorage.setItem("someValue",someValue);
window.location="next-page.html";
}
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).bind("mobileinit", function()
{
if (navigator.userAgent.indexOf("Android") != -1)
{
$.mobile.defaultPageTransition = 'none';
$.mobile.defaultDialogTransition = 'none';
}
});
</script>
<script src="js/jquery.mobile-1.3.2.min.js" type="text/javascript"></script>
$(document).bind(“mobileinit”,function()
{
if(navigator.userAgent.indexOf(“Android”)!=-1)
{
$.mobile.defaultPageTransition='none';
$.mobile.defaultDialogTransition='none';
}
});
够了
在调用Jquery mobile js之前,您需要一些东西,请执行以下操作:
<a href='javascript:void(0)' class='news-main' onclick='someFunction()'>Some String</a>
function someFunction(){
//setting some value that I need in next page
window.sessionStorage.setItem("someValue",someValue);
window.location="next-page.html";
}
<script src="js/jquery-1.10.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).bind("mobileinit", function()
{
if (navigator.userAgent.indexOf("Android") != -1)
{
$.mobile.defaultPageTransition = 'none';
$.mobile.defaultDialogTransition = 'none';
}
});
</script>
<script src="js/jquery.mobile-1.3.2.min.js" type="text/javascript"></script>
$(document).bind(“mobileinit”,function()
{
if(navigator.userAgent.indexOf(“Android”)!=-1)
{
$.mobile.defaultPageTransition='none';
$.mobile.defaultDialogTransition='none';
}
});
够了
$(document).bind(“mobileinit”,function()
{
if(navigator.userAgent.indexOf(“Android”)!=-1)
{
$.mobile.defaultPageTransition='none';
$.mobile.defaultDialogTransition='none';
}
});
$(document).bind(“mobileinit”,function()
{
if(navigator.userAgent.indexOf(“Android”)!=-1)
{
$.mobile.defaultPageTransition='none';
$.mobile.defaultDialogTransition='none';
}
});
我还尝试在链接中添加数据转换:没有,但不幸的是没有帮助。马尤·马约里桑在上面给出的解决方案帮助了我。谢谢你的建议。我也试着把数据转换:没有在我的链接,但不幸的是没有帮助。马尤·马约里桑在上面给出的解决方案帮助了我。谢谢您的建议。请参阅---Setting viewport to user scalable=没有为我解决问题。请参阅---Setting viewport to user scalable=没有为我解决问题。