This did the trick for me.
function resetSlick($slick_slider, settings) {
$(window).on('resize', function() {
if ($(window).width() < 320) {
if ($slick_slider.hasClass('slick-initialized')) {
$slick_slider.slick('unslick');
}
return
}
if (!$slick_slider.hasClass('slick-initialized')) {
return $slick_slider.slick(settings);
}
});
}
slick_slider = $('.client-logos');
settings = {
slidesToShow: 6,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
prevArrow: '',
nextArrow: '',
pauseOnHover: true,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 5,
slidesToScroll: 1,
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 3,
slidesToScroll: 1
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
}
// You can unslick at a given breakpoint now by adding:
// settings: "unslick"
// instead of a settings object
]
};
slick_slider = $('.container');
settings = {
slidesToShow: 6,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 2000,
prevArrow: '',
nextArrow: '',
pauseOnHover: true,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 5,
slidesToScroll: 1,
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 3,
slidesToScroll: 1
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
}
// You can unslick at a given breakpoint now by adding:
// settings: "unslick"
// instead of a settings object
]
};
slick_slider.slick(settings);
resetSlick(slick_slider, settings);
Add this to your js and call the slider as shown.
and in your css make the slide
display: inline-block;
that's it. will work on all responsive screens.