I have implemented slick slider which works fine without resizing the browser. But when I resize the browser to 1024 then the responsive breakpoint settings doesn't work.
Jquery--
$('.slider').slick({
centerMode: true,
slidesToShow: 1,
slidesToScroll: 1,
dots: true,
infinite: true,
cssEase: 'linear',
variableWidth: true,
variableHeight: true,
mobileFirst: true,
responsive: [{
breakpoint: 1024,
settings: {
slidesToShow: 4,
slidesToScroll: 1,
centerMode: false
}
}]
});
Demo -- https://jsfiddle.net/squidraj/hn7xsa4y/4/
Any help is highly appreciated.
Fully responsive. Scales with its container. Uses CSS3 when available. Fully functional when not.
Breakpoints are the pixel values where Smart Slider changes to show a different layout. For example, you can use breakpoints to make the slider switch to tablet view below 1199px screen width. Breakpoints in Smart Slider based on both the width and height of the browser where the slider displays.
The breakpoints refer to the screen width to trigger the logic of the following settings at. Specifically, they will trigger up to the specified value (in pixels). In your above example, this correlates to the following: 480px and narrower: 1 slide is shown.
The carousel is a slideshow for cycling through a series of content, built with CSS 3D transforms and a bit of JavaScript. It works with a series of images, text, or custom markup. It also includes support for previous/next controls and indicators. Official documentation.
Add this settings to your code;
$(".slides").slick({
autoplay:true,
mobileFirst:true,//add this one
}
Add slidesToShow
and slidesToScroll
option in each breakpoint.
{
breakpoint: 786,
settings: {
slidesToShow: 3,
slidesToScroll: 1,
}
},
{
breakpoint: 568,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With