Hide nav on mobile when you select a destination

This commit is contained in:
Notoric 2024-05-29 18:35:00 +01:00
parent 9eab378d50
commit 6d586c0982
1 changed files with 11 additions and 0 deletions

View File

@ -21,6 +21,17 @@ topshrtct.addEventListener('click', () => {
}
});
let links = document.getElementsById('navbar').getElementsByTagName('a');
for (let link of links) {
link.addEventListener('click', () => {
const navbar = document.getElementById('navbar');
navbar.classList.remove('expanded');
navbtn.classList.remove('expanded');
});
}
async function updateAge() {
setInterval(() => {
const birthdate = new Date('2002-02-12T07:35:00Z');