Answer the question
In order to leave comments, you need to log in
How can I make the slick slider only apply to mobile devices (resolution less than 759px)?
I want to use this slider kenwheeler.github.io/slick
I
use Vue and I need to understand where to initialize the slider, where to turn it off or on the contrary to turn it on so that it works only on a mobile phone. Tell me how to use the slider exactly there. There is an unslick method, but I don't understand how to use it in the Vue framework
Answer the question
In order to leave comments, you need to log in
Why mix two ecosystems?
Look for a slider on vue. Or at least vanilla.
On the question:
in mounted, hang the matchMedia listener on the desired range and initialize / deactivate the slick in it.
in addition, you can use the built-in functionality. Pay attention to this example - in the range 0..300 the slider is turned off.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question