sliding left to right transition in jQuery Mobile

uzay95 picture uzay95 · Aug 26, 2011 · Viewed 24.4k times · Source

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?

Answer

Daniel picture Daniel · Apr 8, 2013

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 });