From ce0b7b81f3e552029b06bda40ebde211e26ddc31 Mon Sep 17 00:00:00 2001 From: 17diksha Date: Tue, 29 Oct 2024 13:47:25 +0530 Subject: [PATCH] Fix header toggle functionality and clean up code --- index.html | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index cf08042..c08192f 100644 --- a/index.html +++ b/index.html @@ -804,13 +804,8 @@

Subscription Successful!

(function() { let headerVisible = false; document.getElementById(" menu").addEventListener("click", function () { - if (headerVisible === false) { - document.getElementById(" header").style.height = "290px"; - headerVisible = true; - } else { - document.getElementById(" header").style.height = "50px"; - headerVisible = false; - } + document.getElementById("header").style.height = headerVisible ? "50px" : "280px"; + headerVisible = !headerVisible; }); // Show "Go to Top" button after scrolling down