question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Links are set as undefined when having multiple sliders

See original GitHub issue

I 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:

screenshot 2018-05-31 16 41 45

to:

screenshot 2018-05-31 16 41 56

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. screenshot 2018-05-31 16 43 32

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
arianoangelocommented, Jan 30, 2020

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.

0reactions
jennicarcommented, May 15, 2020

Experiencing the same issue. Links inside the slider gets nulls in their data-href and href 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found