更改 jQuery Mobile 过渡方向
我正在开发一个 Web 应用程序,我决定使用 jQuery Mobile。问题是我的网站是波斯语,这是一种从右到左的语言。我创建了一个 rtl.css 样式表,它可以反转所有内容,但我还需要反转默认的幻灯片转换,这意味着它应该从左向右滑动,并且在添加数据反转或后退按钮时它应该从右向左滑动。
你能帮我解决这个问题吗?
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以在此处查看文档。
在你的情况下,你应该这样写:
有 另一种方法:
您可以在链接中使用
data-direction
属性。示例:
我认为您可以通过这种方式全局设置它:您可以在 jQuery Mobile JS 中找到以下语句:
在该行,您可以将
reverse:false
更改为reverse:true
。You can check the documentation here.
In your case, you should put this :
There is another method:
You can use the
data-direction
attribute in the link.Exemple :
I think that you can set it globally in that way : you can find the following statement in the jQuery Mobile JS :
At that line, you can change
reverse:false
toreverse:true
.对于标记来说,这似乎提供了更好的幻灯片效果,并且也更符合 jQuery Mobile 在其文档中所做的事情。
For markup, this seems to provide for a better slide effect and also more in-line with what jQuery Mobile does in their docs.
我认为没有全局选项,但您可以迭代所有页面并添加属性
jQM 文档:
但 @Zakaria 也是一个有效的响应
I don't think there is a Global option but you could iterate through all the page and add the attribute
jQM Docs:
but @Zakaria is also a valid response