To remove the scrollbar on mobile view for a slick slider, you can use CSS media queries to target mobile devices and set the overflow property to hidden. Here's an example:
@media (max-width: 767px) {
.slick-slider {
overflow: hidden;
}
}
This will hide the scrollbar on devices with a maximum width of 767 pixels. You can adjust the max-width value to target different screen sizes.
Alternatively, you can use the unslick method provided by Slick to disable the slider on mobile devices. Here's an example:
$(document).ready(function(){
$('.slick-slider').slick({
// slick slider options
});
$(window).on('resize', function(){
if ($(window).width() < 768) {
$('.slick-slider').slick('unslick');
}
});
});
This will disable the slick slider on devices with a width less than 768 pixels. You can adjust the width value to target different screen sizes.