This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
seepur/resources/scripts/components/navbar.ts

15 lines
391 B
TypeScript
Raw Normal View History

document.addEventListener("DOMContentLoaded", function () {
(function Navbar() {
const menuButton: HTMLAnchorElement = document.getElementById('menu-button') as HTMLAnchorElement;
const navMenu: HTMLDivElement = document.getElementById('nav-menu') as HTMLDivElement;
menuButton.onclick = (event) => {
navMenu.classList.toggle('is-active');
}
})();
//....
});