From 7d292771fa2e1124b98b774028b7b79fc7e8d236 Mon Sep 17 00:00:00 2001 From: Fitnessgeek Date: Fri, 3 May 2024 23:04:19 +0100 Subject: [PATCH] Adjusting js --- script.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/script.js b/script.js index a4b5841..3d81cfe 100644 --- a/script.js +++ b/script.js @@ -5,12 +5,9 @@ document.addEventListener("DOMContentLoaded", function() { // Add a click event listener to each header headers.forEach(header => { header.addEventListener('click', function() { - // Toggle the 'active' class on the section - const section = header.parentElement; - section.classList.toggle('active'); + // This finds the next sibling element (which should be the