A
A
Aleks Kirilov2020-02-21 14:23:36
JavaScript
Aleks Kirilov, 2020-02-21 14:23:36

Why doesn't breakpoint work?

$(".reviews-slider").slick({
    arrows: false,
    dots: false,
    slidesToShow: 2,
    slidesToScroll: 1,
    inifite: true,
    centerMode: true,
    centerPadding: "150px",
    responsive: [
      {
        breakpoint: 1275,
        settings: {
          arrows: false,
          centerMode: false,
          centerPadding: "100px",
          slidesToShow: 1
        }
      },
      {
        breakpoint: 450,
        settings: {
          arrows: false,
          centerMode: true,
          slidesToShow: 1
        }
      }
    ]
  });


As a result, it does not work on devices with a small screen.
Where is the error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
approximate solution, 2020-02-21
@anton12333

Enabling "Mobile First" option within settings (which swaps to min-width responsive approach)
Changed default value of "Slides to show" to 1 (for mobile)
Add min-width responsive breakpoints for tablet and desktop, setting "Slides to show" to 2 and 3, respectively

Try turning on mobilefirst, and set the breakpoints in the opposite direction. Slicks had such a jamb.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question