Hello. First of all, I owe my gratitude to this library. I'm a little confused in the Javascript side for multiple checkboxes when reading documents. I've written a more understandable code block instead. I hope it can help. ( I would also like to discuss how better the code can be.🙋♂️ )
document.addEventListener("DOMContentLoaded", () => {
startSwitcheryAtStart();
});
const startSwitcheryAtStart = () => {
const checkboxElements = document.querySelectorAll(".js-switch");
[...checkboxElements].map( el => {
const switchery = new Switchery(el);
});
};