如何使 jQuery 工具可滚动 RTL 或从最后一项开始?
我正在使用 jQUery Tools
创建一个带有自动滚动导航的可滚动控件。 现在自动滚动从左侧第一项开始 (有道理) 现在我的问题是如何使其成为 RTL? 我相信让自动滚动从末尾开始到开头就可以了 容易多了。
有人知道我到底该怎么做吗?
提前致谢, 埃里克
I am using jQUery Tools
to create a scrollable with navigation that autoscrolls.
Now the autoscroll starts with the first item from the left
(makes sense)
Now my question how can i make it RTL?
I belive making the autoscroll start from the end to the begining would do the trick
much easier.
Any one knows how the hell do i do that?
Thanks in advance,
Eric
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为该插件不支持它......您必须修改其代码。
以下是来自 flowplayer 论坛的一个示例,
反向自动滚动
I don't think it is supported by the plugin... you will have to modify its code.
Here is one example from the flowplayer forum,
autoscroll with reversed direction
官方答案链接不再有效。使用当前的工具,在创建可滚动项 #scroller 后,您需要类似的东西:
$("#scroller").data("scrollable").next = function(time) { return this.move(-1, time) ); };
您正在覆盖“下一个”函数以向后移动而不是向前移动。这就是我们与自动滚动一起需要的全部内容,但是您也可以对“.prev”执行相同的操作来反转那里的方向。
official answer link doesn't work any more. with current tools, you'd want something like this after creating the scrollable item #scroller:
$("#scroller").data("scrollable").next = function(time) { return this.move(-1, time); };
you're overwriting the "next" function to move backwards instead of forwards. this was all we needed along with autoscroll, but you'd do the same with ".prev" to reverse the direction there as well.