jCarousel - how to get pause on hover with autoscroll?

user1152435 picture user1152435 · Jan 16, 2012 · Viewed 15.2k times · Source

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

Answer

mkp picture mkp · Mar 22, 2012

add this code into your jcarousel initCallback(carousel)

 carousel.clip.hover(function() {
    carousel.stopAuto();
}, function() {
    carousel.startAuto();
});