a11y-slider
a11y-slider copied to clipboard
How to add more sliders on one page?
Hi. How to add more sliders on one page? If you just copy and paste the same html code, then only the first slider works.
@fjord20 Select all your sliders and then iterate over the list:
const sliders = document.querySelectorAll('.slider');
sliders.forEach(sliderEl => {
const slider = new A11YSlider(sliderEl);
});