m |
m |
||
Line 181: | Line 181: | ||
if(window.innerWidth <= 1024) { | if(window.innerWidth <= 1024) { | ||
navbarLinks[0].style.height = "0"; | navbarLinks[0].style.height = "0"; | ||
+ | var navBtn = document.getElementById("nav-icon"); | ||
+ | if(navBtn.classList.contains("toggle-nav") // if the icon is an X | ||
+ | { | ||
+ | navBtn.classList.toggle("toggle-nav"); | ||
+ | } | ||
} | } | ||
else { | else { |
Revision as of 17:45, 6 September 2020