jCarousel - 如何通过自动滚动暂停悬停? [英] jCarousel - how to get pause on hover with autoscroll?
问题描述
JCarousel 最近发生了变化(2011 年 1 月).
它曾经有一种通过自动滚动实现悬停暂停的方法.
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?
示例代码在这里 - http://testsite3.dk/jcarousel/
Jcarousel 在这里:github.com/jsor/jcarousel
Example code is here - http://testsite3.dk/jcarousel/
Jcarousel here: github.com/jsor/jcarousel
链接到 JQuery + javascript 以在此处加载拇指 - http://testsite3.dk/jcarousel/autoscroll.txt
Link to JQuery + javascript to load thumbs here - http://testsite3.dk/jcarousel/autoscroll.txt
推荐答案
将此代码添加到您的 jcarousel initCallback(carousel)
add this code into your jcarousel initCallback(carousel)
carousel.clip.hover(function() {
carousel.stopAuto();
}, function() {
carousel.startAuto();
});
这篇关于jCarousel - 如何通过自动滚动暂停悬停?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!