Alen Liu

人生最重要的不是过得怎样,而是懂得怎样过。

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

jQuery mobile开发移动应用和web应用的时候,页面切换会闪烁。

感觉,造成这样的原因大概是jQuery mobile在移动浏览器下的性能不佳造成的。jQuery mobile页面切换可以有很多效果,用data-transition来定义。超链接和脚本跳转都能定义。

将data-transition定义为none,页面跳转的时候基本就不会出现闪烁了。

html:

<href="demo1/demo1.html" data-transition="none">  

javascript:

$.mobile.changePage(anchor.attr("href"), {  

transition: "none",  

changeHash: false  

});  

posted on 2016-07-19 14:59  Alen Liu  阅读(642)  评论(0编辑  收藏  举报