From 3e5702b10504fcdba07064338d3e8e28c1748c8f Mon Sep 17 00:00:00 2001 From: Tilman Date: Sun, 25 Jun 2023 17:08:38 +0200 Subject: [PATCH] commit --- index.twig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/index.twig b/index.twig index 0042f05..aa4d037 100644 --- a/index.twig +++ b/index.twig @@ -188,15 +188,13 @@ */ function menuOpacity() { - const navbar = document.getElementById("radio"); - let y = navbar.scrollTop; - if (y > 10) { + const navbar = document.getElementById("navbar"); + if (window.scrollY > 10) { navbar.style.setProperty('--bs-bg-opacity', 1); } else { navbar.style.setProperty('--bs-bg-opacity', 0); } - console.log(y); }