blur content when the menu is open
This commit is contained in:
1 parent
5547352ff2
commit
7ed89b8b4f
6 files changed
+36
-8
No files matched your search
@@ -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");
|
||||
}
|
||||
});
|
||||
})();
|
||||
Reference in new issue
Block a user