滑动滑块不会总是第一次加载

问题描述 投票:5回答:1

我有一个活动站点,在一页上有3个滑条,通常滑条不会初始化,相反,我只会看到所有图像,有时如果刷新它们也会开始工作。

https://au.hairandme.com.au/collections/all/products/hair-rejuvenation-treatment

是相关页面。

 ( function($) {
$.noConflict();
  $(document).ready(function() { 
  $('.HEROSLIDE').slick({
    autoplay: true,
  autoplaySpeed: 2000,
    pauseOnFocus: false,
  });

  $('.HEROSLIDEMOBILE').slick({
    autoplay: true,
  autoplaySpeed: 2000,
    pauseOnFocus: false,
  });
    $('.benefits-slider').slick({
  centerMode: true,
  centerPadding: '60px',
  slidesToShow: 3,
  responsive: [
    {
      breakpoint: 1024,
      settings: {
        arrows: true,
        centerMode: true,
        centerPadding: '40px',
        slidesToShow: 3
      }
    },
    {
      breakpoint: 768,
      settings: {
        arrows: true,
        centerMode: true,
        centerPadding: '40px',
        slidesToShow: 2
      }
    },
    {
      breakpoint: 480,
      settings: {
        arrows: true,
        centerMode: true,
        centerPadding: '40px',
        slidesToShow: 1
      }
    }
  ]
});

$('.accordion').accordion({
defaultOpen: '',
cookieName: 'accordion_nav'
});
});
    } ) ( jQuery );
slider slick.js
1个回答
0
投票

就我而言,一页上有4个光滑的滑块,问题是相同的,并且这是2019年底:)但是我通过删除此滑块具有的属性'adaptiveHeight'进行了修复。因此,根据我的问题,也许您还需要通过评论来检查每个属性

© www.soinside.com 2019 - 2024. All rights reserved.