Search code examples
androidjquerycordovajquery-mobilejquery-mobile-button

JQueryMobile: does data-transition="slideback" or alike exist?


When clicking on the "home" button in my menu, I want a page transition (data-transition="slide") in the reverse move. Does something like data-transition="slideBACK" exist ?


Solution

  • You can do it like this:

    $.mobile.changePage("help.html", {
        reloadPage: true,
        transition: "slide",
        reverse: true
    });
    

    You will get wanted effect.

    Working example: http://jsfiddle.net/Gajotres/82ke9/

    To test it, go to the second page and click button Slide back.

    Or there's a pure HTML solution:

    <a href="#index" data-role="button"  data-direction="reverse" data-transition="slide">Reverse slide back - Variant</a>