I'm using GlideJS version 3.4 on a site to make a simple slider.
This is my how I'm mounting GlideJS
var slider = $('.glide');
if (slider) {
var glide = new Glide('.glide', {
type: 'carousel',
startAt: 0,
perView: 2
}).mount();
} else {
console.log("Nothing");
}
Then this is my error:
Uncaught TypeError: Cannot read property 'children' of undefined
at Object.get (glide:6)
at Object.mount (glide:6)
at glide:6
at G.value (glide:6)
at G.value (glide:6)
at <anonymous>:1:7
What I've done so far is check the GlideJS Build and even move things around.
I'm not sure if this is a problem with the HTML or just the Javascript but I'm lost.
Even checked if other things like Bootstrap v4.6 or Jquery was the issue.
Thank you for any answers in advance.