Do Hover in an image and it stops immediately with Slick Slider

0

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

    
asked by Dario B. 14.08.2018 в 08:45
source

1 answer

2

Try these values for the slick:

          speed: 750,
          autoplay: true,
          infinite: true,
          autoplaySpeed: 0,
          slidesToScroll: 0.1,

Like in this jsfiddle

    
answered by 18.09.2018 / 11:27
source