blur content when the menu is open

This commit is contained in:
Daniel Schön committed 2020-05-22 13:28:30 +02:00
1 parent 5547352ff2
commit 7ed89b8b4f
6 files changed
+36 -8

No files matched your search

+12
View File
@@ -32,4 +32,16 @@
}
}
}
// Blur content when the menu is open
const checkbox = document.getElementById("menu-trigger");
const wrapper = document.getElementById("wrapper");
checkbox.addEventListener("change", function() {
if (this.checked) {
wrapper.classList.add("trigger-wrapper");
} else {
wrapper.classList.remove("trigger-wrapper");
}
});
})();