Line 10: | Line 10: | ||
// Close the dropdown if the user clicks outside of it | // Close the dropdown if the user clicks outside of it | ||
− | window.onclick = function( | + | window.onclick = function(e) { |
− | if (! | + | if (!e.target.matches('.dropbtn')) { |
var myDropdown = document.getElementById(id); | var myDropdown = document.getElementById(id); | ||
if (myDropdown.classList.contains('show')) { | if (myDropdown.classList.contains('show')) { | ||
Line 393: | Line 393: | ||
<div class="dropdown"> | <div class="dropdown"> | ||
− | <button class="dropbtn" | + | <button class="dropbtn" onmouseover="myFunction('5')"><b>Awards</b> |
<i class="awards"></i> | <i class="awards"></i> | ||
</button> | </button> |
Revision as of 22:53, 27 October 2017