Difference between revisions of "Template:Queens Canada/Scripts"

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";
        openMobileNav();
+
 
     }
 
     }
 
     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)
        closeMobileNav();
 
 
     }
 
     }
{}
 
 
}   
 
}   
  

Revision as of 17:36, 6 September 2020