2024-03-18 15:04:04 +00:00
|
|
|
const header_links = document.getElementById("header-links");
|
|
|
|
const hamburger = document.getElementById("header-links-toggle");
|
|
|
|
|
|
|
|
document.addEventListener("click", event => {
|
2024-03-22 07:30:22 +00:00
|
|
|
if (!header_links.contains(event.target) && !hamburger.contains(event.target) && !header_links.href) {
|
2024-03-18 15:04:04 +00:00
|
|
|
header_links.classList.remove("open");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2024-04-16 16:53:24 +00:00
|
|
|
hamburger.addEventListener("click", event => {
|
|
|
|
header_links.classList.toggle("open");
|
|
|
|
});
|