From 1a03205aba0db7a3574a07d7a0ef515a5731fe5b Mon Sep 17 00:00:00 2001 From: FrankZamora Date: Wed, 26 Nov 2025 23:42:28 -0600 Subject: [PATCH] Fix: allow navbar dropdown parent links to navigate on desktop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added JavaScript to handle click on dropdown-toggle links: - On desktop (>= 992px): navigates to the href URL - On mobile: allows Bootstrap dropdown toggle to work 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Assets/js/main.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Assets/js/main.js b/Assets/js/main.js index b7abfdd8..f6896fbc 100644 --- a/Assets/js/main.js +++ b/Assets/js/main.js @@ -310,3 +310,22 @@ document.addEventListener('DOMContentLoaded', function() { }); window.addEventListener('scroll', updateActiveSection); + +// === NAVBAR DROPDOWN - Allow parent links to navigate on desktop === +document.addEventListener('DOMContentLoaded', function() { + document.querySelectorAll('.navbar .dropdown > .dropdown-toggle[href]').forEach(function(link) { + link.addEventListener('click', function(e) { + var href = this.getAttribute('href'); + // Only navigate if link has a real URL (not # or empty) + if (href && href !== '#' && href !== '' && href !== '#!') { + // On desktop (>= 992px), navigate to the link + if (window.innerWidth >= 992) { + e.preventDefault(); + e.stopPropagation(); + window.location.href = href; + } + // On mobile, let Bootstrap handle dropdown toggle + } + }); + }); +});