mirror of
https://github.com/nunocoracao/blowfish.git
synced 2025-01-23 23:15:46 -06:00
12 lines
367 B
JavaScript
12 lines
367 B
JavaScript
|
function header_toggle_nested_menu(element) {
|
||
|
if (!element) {
|
||
|
throw new Error("Could not find button")
|
||
|
}
|
||
|
let parent_element = element.parentElement;
|
||
|
if(!parent_element) {
|
||
|
throw new Error("Could not get parent element from button")
|
||
|
}
|
||
|
let nested_menu = parent_element.querySelector(".header-nested-menu")
|
||
|
nested_menu.classList.toggle('hidden');
|
||
|
}
|