Initial commit

This commit is contained in:
Marek Lesko
2025-08-05 10:59:30 +02:00
commit 0019c5c601
835 changed files with 426250 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
const nice_checkbox = () => {
const allChecboxItems = document.querySelectorAll(".checkbox-item");
if (allChecboxItems?.length) {
allChecboxItems.forEach((checkboxItem, idx) => {
const checkbox = checkboxItem.querySelector("input[type='checkbox']");
if (checkbox) {
const checkmark = checkbox
.closest(".checkbox-item")
.querySelector(".checkmark");
if (checkbox.checked) {
checkmark.classList.add("active");
} else {
checkmark.classList.remove("active");
}
checkbox.addEventListener("change", function () {
const value = this.checked;
const checkmark =
this.closest(".checkbox-item").querySelector(".checkmark");
if (value) {
checkmark.classList.add("active");
} else {
checkmark.classList.remove("active");
}
});
}
});
}
};