更改同一页面上的页面过渡 [英] Change page transition on the same page

查看:112
本文介绍了更改同一页面上的页面过渡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有两个内部页面(data-role ="page")的html.其中一页显示日期和与该日期相关的数据.当我向左或向右滑动时,日期应该会改变.

I have a html with two internal pages (data-role="page"). One of the pages shows a days date and data which are connected to this date. When I swipe left or right the day should change.

我在这里需要显示的页面过渡.看来我不能在同一页面上使用$.mobile.changePage().最终,我不想刷新页面,因为我必须保留一些全局变量.

What I need here is to get the page transition to show. It seems like I can't use the $.mobile.changePage() for the same page. Ultimately I don't want to refresh the page since I have some global variables I have to keep.

有什么建议可以实现这一目标吗?

Any suggestions how I can achieve this?

此处找到了解决方案.使用以下代码行:

Found the solution Here. Used this line of code:

$.mobile.changePage( "#reused-page", { allowSamePageTransition: true } );

推荐答案

应该执行以下操作:

$.mobile.changePage( "#other-page", { allowSamePageTransition:true } );

这篇关于更改同一页面上的页面过渡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆