Trying to use slickSetOption to set autoplay to true, will have this trigger another way eventually. But the problem is that when I try to use slickSetOption nothing happens. Any idea what I'm doing wrong here?
$(".slick-slider").slick({
slidesToShow: 3,
infinite:false,
slidesToScroll: 1,
autoplay: false,
autoplaySpeed: 2000
});
$(".slick-slider").slick("slickSetOption", "autoplay", true, false);
CodePudding user response:
I don't know why slickSetOption is not working, but this does.
Change your code to this:
$(".slick-slider").slick({
slidesToShow: 3,
infinite: false,
slidesToScroll: 1,
autoplay: false,
autoplaySpeed: 2000
});
$(".slick-slider").slick('slickPlay');