After implementing a slider using slick slider, I encountered an issue with the width when testing it online and in a normal HTML file.
If anyone could assist me in resolving this issue, I would greatly appreciate it. Please inspect the code for both scenarios and provide feedback.
let slider = $(".slider");
slider.not('.slick-initialized').slick({
autoplay: false,
infinite: true,
vertical: false,
dots: true,
arrows: true,
slidesToShow: 1,
slidesToScroll: 1,
customPaging: function(slider, i) {},
responsive: [{
breakpoint: 1024,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
vertical: false,
},
}, {
breakpoint: 600,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
vertical: false,
},
}, {
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
vertical: false,
},
}]
});
...
To view the code in action, please visit CodePen or JSFiddle.