I tried to add into my website view checkboxes with js-switch class. This code use Switchery module. I wrote my example below:
<pre><code>http://codepen.io/Rootka/pen/bpvbNy</code></pre>
How to add a view checkboxes with same class - e.g. "js-switch"?
With querySelectorAll()
you can do the following to active your switches:
var elem = document.querySelectorAll('.js-switch');
for(var i = 0; i < elem.length; i++ ){
new Switchery(elem[i], {className:"switchery"});
}
Your now working codepen: http://codepen.io/kbkb/pen/dMmbvK