Open pbmills opened 3 years ago
new Glide('.glide', {
arrows: {
prev: '.glider-prev',
next: '.glider-next'
},
type: 'carousel',
animationDuration: 1000,
// autoplay: 3500,
focusAt: '1',
startAt: 3,
perView: 1,
}).mount();
.glide
should be string, you dont have to use document.querySelector('.glide')
See example https://glidejs.com/docs in the introduction
I am not sure why I kept getting error Uncaught TypeError: Cannot read property 'querySelector' of undefined
Error which I am getting on other pages where I am not using Glide.js
Install the Glide JS via NPM Modules.
my JS Code
My Frontend Demo code