Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
186
rated 0 times [  192] [ 6]  / answers: 1 / hits: 26758  / 13 Years ago, sun, january 29, 2012, 12:00:00

I'm working on a web app, which I decided to use jQuery Mobile for it. The problem is my website is in Persian language which is a Right-to-Left language. I've created an rtl.css stylesheet which reverses everything, but I need to also reverse default slide transitions, meaning that it should slide from left to right and when adding data-reverse or back button it should slide right to left.



Can you please help me with this?

Thanks.


More From » jquery

 Answers
9

You can check the documentation here.



In your case, you should put this :



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


There is another method:
You can use the data-direction attribute in the link.



Exemple :



<a href=nextPage.html data-transition=slide, data-direction: reverse>Next page</a>


I think that you can set it globally in that way : you can find the following statement in the jQuery Mobile JS :



a.mobile.changePage.defaults


At that line, you can change reverse:false to reverse:true.


[#87747] Friday, January 27, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
alfonsok

Total Points: 386
Total Questions: 101
Total Answers: 90

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;