I'm adding pages run time when swipeleft is happened. But when swiperight happened I can't return the previous page that I'm created with sliding from left to right.
I have added the data-direction="reverse"
to the pages but it didn't create left-to-right effect.
Is there any way to do this?
A maybe easier way using JQM would be:
<a href="page.html" data-transition="slide" data-direction="reverse">Link Text</a>
or also, within js as:
$.mobile.changePage("page.html", { transition: 'slide', reverse: true });
function ChangePage(pageId,iPageIndex) {
var forward = iCurrCardIndex < iPageIndex;
iCurrCardIndex = iPageIndex;
$.mobile.changePage("#" + pageId, "slide", !forward, true);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With