How to initialize/adjust the js for multiple/dynamic stories on the same page?
Closed this issue · 1 comments
pgroot91 commented
Would be nice if the script works for as many stories that are on a single page.
pgroot91 commented
Solved my issue with the following snippet:
var element = document.querySelectorAll('[data-slide]'); if (typeof(element) != 'undefined' && element != null) { Array.from(document.querySelectorAll('[data-slide]')).forEach(el => { new SlideStories(el.getAttribute('data-slide')); }); }