douxi1968 2018-08-16 10:11
浏览 99

光滑滑块继续滑块但立即停顿

i work for now with slick slider and I have built a continuous slider. The problem is that I need that when I hover in an image, it stops immediately, but I do not get it.

Here ist my code with images(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; ?>

and this is the 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,
            }
        }
    ]

});

Please, help me. thanks and regards

  • 写回答

1条回答 默认 最新

  • dongyouji7022 2018-08-16 11:14
    关注

    Remove your speed:4000 parameter that stop's the hover effect

    评论

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突