K
K
Konstantin2020-11-17 13:28:19
Android
Konstantin, 2020-11-17 13:28:19

Why doesn't responsive work on slick?

A site with a problem

I'm typing for a 1024px screen, but because of the slider it scrolls to the right.

Problem in the "Health Encyclopedia" block (.encyclopedia__slider )

I specified in the slider settings ( src/js/main.js ) the behavior at 1024 (remove arrows, display 1 slide), but 2 slides are displayed and the arrows did not disappear:

$('.encyclopedia__slider').slick({
  dots: false,
  infinite: false,
  speed: 300,
  slidesToShow: 2,
  slidesToScroll: 1,
  responsive: [
    {
      breakpoint: 1024,
      settings: {
        slidesToShow: 1,
        slidesToScroll: 1,
        infinite: true,
        arrows: false,
      }
    },
    {
      breakpoint: 600,
      settings: {
        slidesToShow: 1,
        slidesToScroll: 1,
        arrows: false,
      }
    },
    {
      breakpoint: 480,
      settings: {
        slidesToShow: 1,
        slidesToScroll: 1,
        arrows: false,
      }
    }
  ]
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question