This slider uses a classic “jQuery-era” approach: we include jQuery, we include a plugin (Slick), and then we run a short setup script that tells Slick to turn our HTML into a carousel.
.slider is the main container Slick looks for..slider becomes one slide.slick.css and slick-theme.css.jquery-slider.css controls the “look” of the images (size, cropping, borders, etc.).object-fit: cover (fills frame, crops)object-fit: contain (shows full image, may letterbox).
The file slider-init.js is where Slick is activated.
It usually looks like this:
$(function () {
$(".slider").slick({
dots: true,
arrows: true,
infinite: true,
speed: 350,
autoplay: false
});
});
File: slider-init.js
These options go inside $(".slider").slick({ ... }).
Try turning ONE option on/off at a time so you can see what it changes.
// Show multiple slides at once (thumbnails / galleries)
slidesToShow: 2,
slidesToScroll: 1,
// Cross-fade instead of sliding (works best with slidesToShow: 1)
fade: true,
// Allow dragging with mouse / touch
draggable: true,
swipe: true,
// Autoplay can be distracting. Use with care.
autoplay: true,
autoplaySpeed: 2000,
pauseOnHover: true,
// Makes slider height match each slide’s content.
// WARNING: can cause the page to jump up/down between slides.
adaptiveHeight: true,
slider-init.js targets .slider exactly.This “plugin approach” is historically important and still used in many older codebases. It also shows the tradeoff: you get lots of features quickly, but you add dependency files and rely on someone else’s code.