R
R
rusglov2018-04-05 22:30:36
css
rusglov, 2018-04-05 22:30:36

How to enable slick.js at a specific resolution?

Guys, help me out. There is a slider on the site, the slick.js plugin is used. When the screen is less than 980px you need to turn on slick. I tried to do it through the responsive property, but nothing works. $('.your-slider').slick('unslick') - only works once, alas. Who faced such a problem, how can it be solved?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Druzhaev, 2018-04-05
@OtshelnikFm

if ($(window).width() <= 980) {
...some
}

J
Jupiter Max, 2018-04-06
@vardoLP

maybe it's easier to turn it on when the window is more than 980?

if($(window).width() >=980){
$('.your-class').slick({
    
  });
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question