我现在使用光滑的滑块工作,并且我建立了一个连续的滑块。问题是,当我将鼠标悬停在图像中时,它需要立即停止,但我没有得到它。
以下是我的带有图片的代码(wordpress):
<?php if ($gallery) : ?>
<div class="row">
<div class="autoplay">
<?php foreach ($gallery as $item) : ?>
<?php if (!$item['optionen']): ?>
<img src="<?php echo $item['bild']['sizes']['large']; ?>"
alt="<?php echo $item['alt']; ?>" data-lity>
<?php else: ?>
<a href="<?php echo $item['video']; ?>" data-lity>
<img src="<?php echo $item['bild']['sizes']['large']; ?>"
alt="<?php echo $item['alt']; ?>"></a>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
这是jQuery
$('.autoplay').slick({
slidesToShow: 3,
autoplay: true,
autoplaySpeed: 1,
infinite: true,
speed: 4000,
focusOnSelect: false,
pauseOnHover: true,
arrows: true,
cssEase: 'linear',
variableWidth: true,
centerMode: true,
responsive: [
{
breakpoint: 768,
settings: {
cssEase: 'none',
autoplay: false,
speed: 0,
autoplaySpeed: 0,
arrows: false,
}
},
{
breakpoint: 480,
settings: {
cssEase: 'none',
autoplay: false,
speed:0,
autoplaySpeed: 0,
arrows: false,
}
}
]
});
请帮帮我。 感谢和问候
答案 0 :(得分:0)
删除您的speed:4000参数,该参数停止了悬停效果