Open ysnitko opened 1 year ago
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); });
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.