This question has already been answered:

I ran into the problem of switching on and off a slice. Suppose I have a block with news and at resolutions less than 768px it becomes a slider, settings: "unslick" does not turn off, the media request in js doesn’t plow a request to add a separate class because connected via cdn, help, urgently need to finish and pass the work

Reported as a duplicate by members of user33274, Community Spirit Jun 4 '18 at 4:08 pm.

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    If you're using jQuery, then this solution will do.

    html:

    <div id='slider'> <div>your content</div> <div>your content</div> <div>your content</div> </div> 

    js:

     $(document).ready(function () { if ($('body').width() < 780) { $('#slider').slick({ }); } }); 
    • yes, thanks, works - Quaden Channel