How do I make the slider to work when I have a loop to create multiple sliders .
I have used switchery and there is an option for making it inside an array using
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
elems.forEach(function(html) {
var switchery = new Switchery(html);
});
So how do i do this for the slider without this only the first slider gets displayed and rest of the slider look like the default one
How do I make the slider to work when I have a loop to create multiple sliders . I have used switchery and there is an option for making it inside an array using var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); elems.forEach(function(html) { var switchery = new Switchery(html); });
So how do i do this for the slider without this only the first slider gets displayed and rest of the slider look like the default one