I'm using a glide JS carousel to show some content as a carousel. Docs of the repository are on the website and github.
My current code is following:
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()
});
What I am trying to achieve is to change the default number of steps (slides) when clicked on the next/prev buttons. At the moment it is always ONE slide. While I would like to use my variable (var slidesNumber) to set as the expected behavior.
I've went through the documentation but it says nothing about that.. is it even doable?