abpetkov / powerange

iOS 7 style range slider
http://abpetkov.github.io/powerange/
423 stars 85 forks source link

How to Use the slider for iterating it in a loop #14

Closed srshkmr closed 9 years ago

srshkmr commented 9 years ago

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

abpetkov commented 9 years ago

It's the same approach, something must be wrong with your code. Here's an example.