Hi, autoplay isn't working in my setup for this site. You can check https://pillr.org/
// Initialize Carousel
if (document.querySelector('.glide')) {
new Glide('.glide').mount({
autoplay: true
});
}
Could you check and advise? Thanks.
Hey @k16e, you are passing the options to the wrong method.
As described in the docs, Glide accepts the options as a second parameter of the Glide class itself. In your case the correct code would be:
// Initialize Carousel
if (document.querySelector('.glide')) {
new Glide('.glide', {
autoplay: true
}).mount();
}
Cheers
Done. I'm glad I asked, I was doing it wrong. Thanks very much!
Most helpful comment
Hey @k16e, you are passing the options to the wrong method.
As described in the docs, Glide accepts the options as a second parameter of the Glide class itself. In your case the correct code would be:
Cheers