m |
m |
||
Line 119: | Line 119: | ||
function closeMobileNav() { | function closeMobileNav() { | ||
closeSubmenus(); | closeSubmenus(); | ||
− | + | navbarLinks[0].style.height = 0; | |
− | + | ||
− | + | ||
− | + | ||
var navBtn = document.getElementById("nav-icon"); | var navBtn = document.getElementById("nav-icon"); | ||
var navLinks = document.getElementsByClassName("navbar-links")[0]; | var navLinks = document.getElementsByClassName("navbar-links")[0]; | ||
Line 184: | Line 181: | ||
} | } | ||
else { | else { | ||
− | navbarLinks[0].style.height = 100%; // to ensure that the regular nav bar gets set back to regular height even after | + | navbarLinks[0].style.height = "100%"; // to ensure that the regular nav bar gets set back to regular height even after |
// the mobile nav has been opened and closed(which would set the height back to 0) | // the mobile nav has been opened and closed(which would set the height back to 0) | ||
} | } |
Revision as of 14:23, 23 August 2020