Reputation: 668
I have slick slider on my page. After click on Next or Previous arrows in slick slider autoplay stop working. But when I click on any place on the page it starts to autoplay again. How I can fix this? I need to have autoplay even after arrow click.
JS:
jQuery(document).ready(function ($) {
var $slider = $('.slider');
if ($slider.length) {
$slider.slick({
slidesToShow: 7,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 1500,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
infinite: true,
autoplay: true,
autoplaySpeed: 1500
}
},
{
breakpoint: 600,
settings: {
autoplay: true,
autoplaySpeed: 1500,
slidesToShow: 2,
slidesToScroll: 2
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 1500
}
}
]
});
}
});
Upvotes: 4
Views: 4370