I have incorporated a glide JS carousel to display content in a carousel format. The documentation for this repository can be found on their official website as well as on Github.
Here is my current code snippet:
jQuery( window ).load(function() {
var slidesNumber = null;
if(document.body.classList.contains('single-portfolio')) {
slidesNumber = 5;
} else {
slidesNumber = 4;
}
var glide = new Glide('.glide', {
type: 'carousel',
perView: slidesNumber,
autoplay: 4000,
animationDuration: 1000,
focusAt: 1
})
glide.mount()
});
My goal is to customize the number of steps (slides) when the next or previous buttons are clicked. The current behavior only moves one slide at a time, but I want to use my variable (var slidesNumber) to determine this behavior.
I have searched through the documentation but found no information on this specific customization. Is it even possible to achieve this?