Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot set duration for carouFredSel Slider

I am using carouFredSel to make Slider, but duration cannot be set. It may run default.

I set like :

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

Say me solution for my issue.

like image 853
Hai Tien Avatar asked Dec 26 '22 18:12

Hai Tien


2 Answers

Try

$('#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
    }
});

Fiddle http://jsfiddle.net/code_snips/bTHnL/

like image 101
Manish Avatar answered Jan 22 '23 13:01

Manish


The duration inside the scroll object sets the time (in ms) it takes for the scrolling animation. To set the timeout between elements you need to set auto to a number

So an example for this:

$('#carousel').carouFredSel({
    auto: 3000, //Set the time between transitions
    scroll : {
        duration: 1000 //The duration of the scroll animation
    }   
});
like image 44
Shahar Avatar answered Jan 22 '23 13:01

Shahar