From f35e4c5faa0605ece646cf26bc6f6c0ab18e844d Mon Sep 17 00:00:00 2001 From: tramirez30 Date: Sun, 15 Dec 2024 23:45:20 -0800 Subject: [PATCH] Moved function inside isActive --- js/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index a9a6efb..59c8130 100644 --- a/js/main.js +++ b/js/main.js @@ -113,12 +113,13 @@ let isActive = (e) => { //Check to see if dropdown was selected if (dropDown.contains(e.target)) { // Toggles dropdown - optionSelected(); + dropDown.classList.toggle("is-active"); icon.classList = "fas fa-angle-up"; } else { closeDropdown(); } + optionSelected(); }; // Option function selected