m |
m |
||
Line 180: | Line 180: | ||
function mobileNav() { | function mobileNav() { | ||
if(window.innerWidth <= 1024) { | if(window.innerWidth <= 1024) { | ||
− | navbarLinks[0].style.height = "0"; | + | //navbarLinks[0].style.height = "0"; |
+ | closeMobileNav(); | ||
} | } | ||
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) | ||
+ | openMobileNav(); | ||
} | } | ||
} | } |
Revision as of 17:03, 6 September 2020