无法设置carouFredSel Slider的持续时间

时间:2013-11-07 10:38:35

标签: jquery caroufredsel

我使用carouFredSel制作Slider,但无法设置持续时间。它可能会默认运行。

我设置如下:

$("#foo6").carouFredSel({
    auto: true,
    responsive: true,
    duration: 2000,
    prev: "#prev6",
    next: "#next6",
    scroll: 1,
    pagination: "#pager6",
    mousewheel: true,
    items: {
        visible: 1,
        width: 200
    }
});

为我解决问题。

2 个答案:

答案 0 :(得分:6)

尝试

$('#carousel').carouFredSel({
    auto: true,
    responsive: true,
    prev: "#prev6",
    next: "#next6",
    scroll: { items:1,duration: 200}, //set duration here
    pagination: "#pager6",
    mousewheel: true,
    items: {
        visible: 1,
        width: 200
    }
});

小提琴http://jsfiddle.net/code_snips/bTHnL/

答案 1 :(得分:4)

duration对象中的scroll设置滚动动画所需的时间(以毫秒为单位)。要设置元素之间的超时,需要将auto设置为数字

这是一个例子:

$('#carousel').carouFredSel({
    auto: 3000, //Set the time between transitions
    scroll : {
        duration: 1000 //The duration of the scroll animation
    }   
});