LE-Website/lethal-extended/js/navbarec92.js

19 lines
624 B
JavaScript
Raw Permalink Normal View History

2024-09-17 16:57:06 +00:00
document.addEventListener('DOMContentLoaded', () => {
const root_elements = $$(".desktop-navbar-root");
root_elements.forEach(root_element => {
const dropdown = root_element.querySelector(".navbar-dropdown");
if(dropdown) {
function show_dropdown() {
dropdown.classList.remove("hidden");
}
function hide_dropdown() {
dropdown.classList.add("hidden");
}
root_element.addEventListener("mouseover", show_dropdown);
root_element.addEventListener("mouseleave", hide_dropdown);
}
});
});