documentation error data-direction #3291

chetankjain opened this Issue Dec 16, 2011 · 2 comments

3 participants


Under the page:
under the section,
"Back" button links
it says,
"Also, please keep in mind that if you just want a reverse transition without actually going back in history, you should
use the data-direction="reverse" attribute instead."

Its not clear if data-direction is to be used with any other attribute. But data-direction does not seem to work properly if proper href value is not used. Is this a bug? Or a documentation bug? Does data-direction need the correct href value to work properly?

There is more detailed documentation in this section that using data-rel will ignore href even if available (in "good" browsers). Please check the behavior on data-direction.

jQuery Foundation member


My understanding is that data-direction="reverse" works with href. So that you may go to a page and "reverse" the direction of the transition.

Having data-rel="back" will ignore the href in "good" browsers and also automatically do a reverse transition to give a "back" feel. Having a data-direction="reverse" or not makes no difference (well at least in "good browsers", it may be that it is used in the browsers that do not support data-rel="back" if they support transtions).

Can someone please either confirm or correct the statement above. Then, I'll clarify the docs.




Yep, the way @agcolom described this is correct.
data-direction="reverse" is meant to simply run the backwards version of the transition that will run on that page change.
data-rel="back" makes the link functionally equivalent to the browser's back button and all the standard back button logic applies

@karol-f karol-f pushed a commit to karol-f/jquery-mobile that referenced this issue Jan 13, 2012
@agcolom agcolom Added clarification to the Back button, Fixes #3291 ead617f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment