From 6f8744dda1bf19dfd15695f86c46b137014ea631 Mon Sep 17 00:00:00 2001 From: elektrischerwalfisch Date: Fri, 11 Apr 2025 23:33:37 +0200 Subject: [PATCH] fix menu-highlighting --- theme/js/presets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/theme/js/presets.js b/theme/js/presets.js index c8c7047..d445c94 100644 --- a/theme/js/presets.js +++ b/theme/js/presets.js @@ -41,7 +41,7 @@ document.addEventListener("DOMContentLoaded", function() { // HEADER: highlight active page in main menu const currentUrl = window.location.href; const currentPath = window.location.pathname; - const menuLinks = document.querySelectorAll('header > ul a'); + const menuLinks = document.querySelectorAll('header nav ul a'); menuLinks.forEach((link) => { // Check if the href matches the current URL or pathname if (link.href === currentUrl || link.pathname === currentPath) { -- 2.47.3