JQuery Mobile: data-direction=“reverse” not emulating initial transition

I have a back button in my header that looks like:

<a href="index.html" data-role="button" data-direction="reverse"
data-icon="arrow-l" data-iconpos="left">Back</a>

The transition to get to this page is slide and, according to the documentation, adding data-direction="reverse" to my back button should 'reverse' the transition that got me to that page, ie: the previous page should slide back. However, this seems to be stuck just on the default fade transition. Is there something I have done wrong in setting this button up? Should I have a different kind of href?


Try adding this:


<a href="/" data-icon="back" data-rel="back" data-direction="reverse">Back</a>

Also I think in order for "reverse" to work you must reference the exact previous URL/page. So if your page1 is "/" then you went to page2 and on page2 you have href="index.html" it won't work.

What you can also do is declare the transition, so the reverse will work

<a href="index.htm" data-role="button" data-direction="reverse" data-transition="slide">Cancel</a>

In my case, this link is 2 pages after, so data-rel="back" was not what I was looking for

Need Your Help

Eclipse gives an empty src and assets folder after creating a new android application project

java android eclipse

Eclipse gives an empty src and assets folder after creating a new android application project, I did go help-update and help-install new software, also I tried deleting everything and reinstalling ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.