Change page transition on the same page

a 夏天 提交于 2019-12-22 03:42:06

问题


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.

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?

EDIT: Found the solution Here. Used this line of code:

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

回答1:


Something like this should do:

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


来源:https://stackoverflow.com/questions/9031564/change-page-transition-on-the-same-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!