Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggle All Switch instance on click #155

Open
PeterTough2 opened this issue Mar 31, 2018 · 0 comments
Open

Toggle All Switch instance on click #155

PeterTough2 opened this issue Mar 31, 2018 · 0 comments

Comments

@PeterTough2
Copy link

I want to toggle all input checkbox on the page when a particular checkbox with a different class/id is clicked
Here is a function i call when DOM is ready, I want to disable/enable all checkbox on click of an element

function activateSwitchery() {
var elems = Array.prototype.slice.call(document.querySelectorAll('input.state_toggle'));
elems.forEach(function(html) {
var switchery = new Switchery(html, {className:"switchery switchery-small"});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant