Skip to content
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
@clarkni5

Description

@clarkni5

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

MauriceG commented on Nov 16, 2011

@MauriceG
Contributor

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

clarkni5 commented on Nov 16, 2011

@clarkni5
Author

Except when using data-rel="back". This sets the direction to reverse and cannot be overridden using the data-direction attribute.

clarkni5

clarkni5 commented on Nov 16, 2011

@clarkni5
Author

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

MauriceG commented on Nov 16, 2011

@MauriceG
Contributor

In your example code you set the target-page, so you can omit the data-rel attribute and set the transition you like.

clarkni5

clarkni5 commented on Nov 16, 2011

@clarkni5
Author

Yes, but I want it to go backwards in the history, not forwards, which would add to the history stack.

toddparker

toddparker commented on Nov 16, 2011

@toddparker
Contributor

Would you mind adding this to the feature request wiki page?

ilmam

ilmam commented on Sep 30, 2014

@ilmam

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

elliscopef commented on Aug 4, 2015

@elliscopef

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @clarkni5@toddparker@MauriceG@elliscopef@ilmam

        Issue actions

          Add attribute: data-direction="forward" · Issue #3077 · jquery-archive/jquery-mobile