From ee3d2810c0e6f3cafc0d24be5a7e5c7e77b9bcd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 6 Feb 2024 20:58:14 +0100 Subject: [PATCH] Fix js --- assets/script.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/script.js b/assets/script.js index 584a07d..8173a66 100644 --- a/assets/script.js +++ b/assets/script.js @@ -1,10 +1,4 @@ let UserInfo = {}; -const toggleButton = document.getElementById("toggle_button") -const navLinks = document.getElementById("navsite_list") - -toggleButton.addEventListener('click', () => { - navLinks.classList.toggle("active") -}) async function handleResponse(data, successMessage, failureMessage) { const statusMessageContainer = document.getElementById("statusMessageContainer"); @@ -154,6 +148,12 @@ async function initAjax() { } }); }); + const toggleButton = document.getElementById("toggle_button") + const navLinks = document.getElementById("navsite_list") + + toggleButton.addEventListener('click', () => { + navLinks.classList.toggle("active") + }) await onPageLoad(); }