Commit 81634438 authored by Dennis Dominik Schöpf's avatar Dennis Dominik Schöpf
Browse files

Fix menu initial state

parent ea85a5ae
/* Current state */
let menuOpen = true;
let menuOpen = false;
/* Store interactive elements */
const menu = document.querySelector('#menu');
const menuTrigger = document.querySelector('#menu-trigger');
/* Register event listeners */
menuTrigger.addEventListener('click', handleMenuButtonClick);
menuTrigger.addEventListener('click', (event) => handleMenuButtonClick(event));
/* Functions */
function handleMenuButtonClick() {
function handleMenuButtonClick(event) {
event.preventDefault();
if (menuOpen === false) {
menuOpen = true;
openMenu();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment