Skip to content
Advertisement

Slick carousel right to left

I’ve setup slick carousel to continuously scroll, however I need to to scroll in the oposite direction. Adding the RTL option didn’t seem to work.

Fiddle here (currently left to right)

http://jsfiddle.net/mth2ghod/

 $(function(){
    $('.slider').slick({

        speed: 10000,
        autoplay: true,
        autoplaySpeed: 100,
        cssEase: 'linear',
        slidesToShow: 1,
        slidesToScroll: 1,
        variableWidth: true

    });
});

Advertisement

Answer

Change the slidesToScroll to a -1 (it will change the slide direction)

 $(function(){
    $('.slider').slick({
       speed: 10000,
       autoplay: true,
       autoplaySpeed: 100,
       cssEase: 'linear',
       slidesToShow: 1,
       slidesToScroll: -1,
       variableWidth: true

    });
});
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement