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

Set different colors to switches on different pages #157

Open
iloveip opened this issue Apr 6, 2018 · 0 comments
Open

Set different colors to switches on different pages #157

iloveip opened this issue Apr 6, 2018 · 0 comments

Comments

@iloveip
Copy link

iloveip commented Apr 6, 2018

Hi there,

I have multiple switches on different pages. How can I set different colors for them based on a page class in the following code?

var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
elems.forEach(function(html) {
  var switchery = new Switchery(html, { color: '#ff0000' });
});
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