Line 188: | Line 188: | ||
function myFunction2() { | function myFunction2() { | ||
− | document. | + | if (!event.target.matches('.dropbtn')) { |
+ | |||
+ | var dropdowns = document.getElementsByClassName("dropdown-content"); | ||
+ | var i; | ||
+ | for (i = 0; i < dropdowns.length; i++) { | ||
+ | var openDropdown = dropdowns[i]; | ||
+ | if (openDropdown.classList.contains('show')) { | ||
+ | openDropdown.classList.remove('show'); | ||
+ | } | ||
+ | } | ||
+ | } | ||
document.getElementById("myDropdown2").classList.toggle("show"); | document.getElementById("myDropdown2").classList.toggle("show"); | ||
} | } |
Revision as of 13:24, 19 May 2017
Our wiki is currently under construction, please bear with us while we make it functional