jCarousel - how to get pause on hover with autoscroll?

后端 未结 4 1549
花落未央
花落未央 2020-12-16 19:54

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

4条回答
  •  情书的邮戳
    2020-12-16 20:27

    I couldn't get the previous examples working. But I did get the following to work with the latest jcarousel.

    $('.carousel').jcarouselAutoscroll(
    {
        interval: 4000, 
        scroll: '+=1',
        create: $('.carousel').hover(function() 
        {
            $(this).jcarouselAutoscroll('stop');
        },
        function() 
        {
            $(this).jcarouselAutoscroll('start');
        });
    });
    

提交回复
热议问题