m |
m |
||
Line 83: | Line 83: | ||
if(i == (x-1)) { | if(i == (x-1)) { | ||
dropLinks[i].className = "drop-link nav-item active-menu"; | dropLinks[i].className = "drop-link nav-item active-menu"; | ||
− | |||
} | } | ||
} | } | ||
Line 107: | Line 106: | ||
/* when i click on the x, that is technically also clicking on the li */ | /* when i click on the x, that is technically also clicking on the li */ | ||
− | function closeSubmenus() { | + | function closeSubmenus(event, arg) { |
for(i = 0; i < dropdownContent.length; i++) { | for(i = 0; i < dropdownContent.length; i++) { | ||
dropdownContent[i].style.visibility = "hidden"; | dropdownContent[i].style.visibility = "hidden"; | ||
} | } | ||
+ | event.stopPropagation(); | ||
} | } | ||
Revision as of 00:36, 22 July 2020