小编Tom*_*ton的帖子

光滑的滑块不会总是第一次加载

我有一个活跃的网站,在一个页面上有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
      }
    }
  ] …
Run Code Online (Sandbox Code Playgroud)

slider slick.js

5
推荐指数
1
解决办法
624
查看次数

标签 统计

slick.js ×1

slider ×1