S
S
Snowfall_Zh2021-07-14 06:29:20
JavaScript
Snowfall_Zh, 2021-07-14 06:29:20

Breakpoint does not work correctly in slick slider, how to fix it?

The slick slider has breakpoint 920 (arrows disappear, dots appear), but when switching to the ipad view, it does not work, and if you switch to some other view and back, they appear. And in other types (iphone, samsung, etc.) everything is fine.

$('.carousel__inner').slick({
    speed: 1200,
    slidesToShow: 1,
    adaptiveHeight: true,
    prevArrow: '<button type="button" class="slick-prev"><img src="icons/carousel_left.png" alt=""></button>',
    nextArrow: '<button type="button" class="slick-next"><img src="icons/carousel_right.png" alt=""></button>',
    responsive: [
      {
        breakpoint: 920,
        settings: {
          dots: true,
          arrows: false
        }
      }
    ]
  });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
igumenov, 2021-07-14
@igumenov

Check positioning. It is quite possible that the media query flies off the screen

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question