I am implementing slick on my website, for this I have adjusted it so that the slider turns continuously if doing the typical image stop at the center. The problem is that for this I had to autoplaySpeed to 1 and speed to 5000, by activating the option pauseOnHover: true, when doing hover, the slider continues to the center and then stops. What I need is that it stops instantly when I hover.
Here I leave the code, is made for wordpress:
<?php
$gallery = get_field('gallery');
?>
<section class="start0">
<?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; ?>
</section>
And here the configuration of the script
$('.autoplay').slick({
slidesToShow: 3,
autoplay: true,
autoplaySpeed: 1,
infinite: true,
speed: 5000,
focusOnSelect: false,
pauseOnHover: true,
arrows: false,
cssEase: 'linear',
variableWidth: true,
centerMode: true,
responsive: [
{
breakpoint: 768,
settings: {
cssEase: 'none',
}
},
{
breakpoint: 480,
settings: {
cssEase: 'none',
}
}
]
});
Could someone help me please? Greetings