Harin Kommuri Harin Kommuri - 2 months ago 8
jQuery Question

data-rel="back" not working properly

I am developing cordova iOS app, The page-transition is working properly from page2 to page1 in android, but not working in iOS.

In Page1, I declared an anchor tag as,

<a href="#page2" data-transition="slide">Page 2</a>.

And in Page2, using anchor tag with data-rel="back" as,

<a href="#" data-rel="back">Page 1</a>.

Anchor tag with
attribute are not worked, I have searched and find a solution with ,

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
$.mobile.hashListeningEnabled = true;
$.mobile.pushStateEnabled = false;

With this code,
works,but data-transition is not working properly from page2 to page1.

I tried with data-direction="reverse" also.But there is no use. Plz help me...


[ Solved ]

Finally I got answer,

<a href="#Page1" data-transition="slide" data-direction="reverse">Page 1</a>.

And I also removed the function described above(onDeviceReady). Shouldn't use data-rel="back" along with data-direction="reverse". data-transition attribute is must when your using data-direction="reverse".