blur content when the menu is open
This commit is contained in:
@@ -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