Does breakpoint in slick-slider work every other time?

  • 0
    Hello. On page 2 blocks with video. The following code is used to initialize slick:
    $('.videos__list').each(function() {
      if ( $(this).hasClass("videos__list__nocarousel")){} else {
        if ( $(this).find('.videos_page').length > 3) {
          $(this).slick({
              slidesToShow: 4,
              dots: false,
              arrows: true,
              nextArrow: '<div class="video_right"><img src="/assets/images/cart-right.png"></div>',
              prevArrow: '<div class="video_left"><img src="/assets/images/cart-left.png"></div>',
              infinite: false,
              responsive: [
                {
                  breakpoint: 915,
                  settings: {
                    slidesToShow: 3
                  }
                }
              ]
          });
        }
      }
    });

    So, the breakpoint is triggered only in the last block - swapped them, it works anyway on the last one. Can you tell me what the problem is?
    JavaScript Aria Wheeler, Aug 16, 2019

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!