How can I disable a slider for desktop resolutions but display it on mobile devices? The following code allows only for the opposite:
$('.slider').slick({
slidesToShow: 5,
slidesToScroll: 1,
autoplay: false,
autoplaySpeed: 2000,
responsive: [
{
breakpoint: 767,
settings: "unslick"
}
]
});
Much cleaner solution than the currently accepted answer: Add the mobileFirst: true,
option:
$('.slider').slick({
slidesToShow: 5,
slidesToScroll: 1,
autoplay: false,
autoplaySpeed: 2000,
mobileFirst: true,
responsive: [
{
breakpoint: 767,
settings: "unslick"
}
]
});
This will interpret your breakpoint settings starting from low resolutions, as intended.
See the settings section in the Slick documentation.