在 slick slider 中,单击箭头转到上一张或下一张幻灯片后,自动播放停止工作,但单击页面的任何区域后,自动播放再次开始工作,但必须在单击箭头后,自动播放更进一步。我该如何解决?
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
}
}
]
});
}
});