jCarousel - 如何通过自动滚动在悬停时暂停?
JCarousel 最近发生了变化(2011 年 1 月)。
它曾经有一种方法可以通过自动滚动实现悬停暂停。
在新版本中,我无法解决如何让自动滚动在悬停时停止:
我希望滚动在鼠标悬停时停止并在鼠标移出时重新开始。
有什么建议吗?
示例代码在这里 - http://testsite3.dk/jcarousel/
Jcarousel 在这里:github.com/jsor/jcarousel
链接到 JQuery + javascript 以在此处加载拇指 - http://testsite3.dk /jcarousel/autoscroll.txt
JCarousel have recently changed (january 2011).
It used to have a way to implement pause on hover with autoscroll.
With the new version I cannot solve how to get autoscroll to stop on hover:
I would like the scroll to stop on mouseover and start again on mouseout.
Any suggestions?
Example code is here - http://testsite3.dk/jcarousel/
Jcarousel here: github.com/jsor/jcarousel
Link to JQuery + javascript to load thumbs here - http://testsite3.dk/jcarousel/autoscroll.txt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
将此代码添加到您的 jcarousel initCallback(carousel) 中
add this code into your jcarousel initCallback(carousel)
我无法让前面的例子工作。但我确实得到了以下内容来与最新的 jcarousel 一起使用。
I couldn't get the previous examples working. But I did get the following to work with the latest jcarousel.
更新答案以保持最新状态。
请参阅 https://github.com/jsor/jcarousel/issues/568 了解正确的回答:
Updating the answer to stay current.
See https://github.com/jsor/jcarousel/issues/568 for the correct answer:
您可以在创建回调中绑定自己的悬停事件:
You can bind your own hover events in the create callback: