This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
Add attribute: data-direction="forward" #3077
Closed
Description
I have run into a situation where it would be nice (and would make sense to the user) to override the default transition direction to go forward. For example, using data-rel="back", I would like to specify data-direction="forward"
<a href="spoon" data-rel="back" data-direction="forward">Cancel</a>
Activity
MauriceG commentedon Nov 16, 2011
Hi!
Forward is the opposite of reverse. So if you omit reverse, it is foward. Isn't it?
Without the data-direction set to reverse, the transition goes forward. But may I got you wrong.
clarkni5 commentedon Nov 16, 2011
Except when using data-rel="back". This sets the direction to reverse and cannot be overridden using the data-direction attribute.
clarkni5 commentedon Nov 16, 2011
By the way, this is not super important to me, so I won't be hurt if it gets a low priority or is otherwise closed. It just seemed like something that would make the API more complete. If you can set the direction to reverse, you should also be able to set it forward.
MauriceG commentedon Nov 16, 2011
In your example code you set the target-page, so you can omit the
data-rel
attribute and set the transition you like.clarkni5 commentedon Nov 16, 2011
Yes, but I want it to go backwards in the history, not forwards, which would add to the history stack.
toddparker commentedon Nov 16, 2011
Would you mind adding this to the feature request wiki page?
ilmam commentedon Sep 30, 2014
Can't believe how this request is old but not addressed yet. Any heads up whether it's going to be implemented at all?
elliscopef commentedon Aug 4, 2015
when you want to slide back, add attribute data-rel = "back" with
$("#pag"+currentPage).attr("data-rel","back");
If you want to do forward. Just remove the attribute
$("#pag"+currentPage).removeAttr("data-rel");