Links are set as undefined when having multiple sliders
See original GitHub issueI have to sliders
jQuery('.glide').each(function(){ new Glide(this, { startAt: 1, perView: 1, peek: 200, autoplay: false, breakpoints: { 576: { peek: 80, } } }).mount(); });
Both sliders work perfectly, except that on swipe, the links are changed from:

to:

This doesn’t happen when I have only one slider in the page.
Both sliders have the same html+php code but in different places in the page.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
html - "Cannot set property 'className' of undefined"
The problem is, the DOM hasn't loaded yet and cannot find your document.querySelectorAll("#slides .slide") because they do not exist. You either ...
Read more >Matlab GUI: problem with variables definition and multiple ...
Now come the problems: when I use the sliders to change the variable values, I get an error saying that those variables are...
Read more >JavaScript · Bootstrap
Don't use data attributes from multiple plugins on the same element. ... A rendered modal with header, body, and set of actions in...
Read more >Slider, Gallery, and Carousel by MetaSlider – Responsive ...
You can optionally link the slide to a URL of your choice. ... Combine that with a slider or slide show, set to...
Read more >Getting and setting slider values - noUiSlider - Refreshless.com
noUiSlider has an API with two simple methods: .get() and .set() . To get the current slider value: slider.noUiSlider.get();. For one-handle sliders, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I guess more people will have this kind of issues when used outside React (like a WordPress website).
Basically you shoulnd’t use the “glide” class when you have more than one carousel in your website. Create another class and for what I’m being testing the issue won’t happen.
Experiencing the same issue. Links inside the slider gets nulls in their
data-href
andhref
attributes after I swipe. I tried @arianoangelo solution of using different classes if there are multiple glide sliders on the same page, but that didn’t work.Don’t think multiple glide sliders are the issue. I’m also getting the same bugginess with the links even with one slider on the page.