Change page transition on the same page

2019-04-20 08:07发布

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条回答
SAY GOODBYE
2楼-- · 2019-04-20 08:59

Something like this should do:

$.mobile.changePage( "#other-page", { allowSamePageTransition:true } );
查看更多
登录 后发表回答