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

m
m
Line 182: Line 182:
 
function mobileNav() {
 
function mobileNav() {
 
     if(window.innerWidth <= 1024) {
 
     if(window.innerWidth <= 1024) {
        //dropdownLinks[0].setAttribute("onclick", "openSubmenu(1)");
 
        //dropdownLinks[1].setAttribute("onclick", "openSubmenu(2)");
 
        //dropdownLinks[2].setAttribute("onclick", "openSubmenu(3)");
 
        //dropdownLinks[3].setAttribute("onclick", "openSubmenu(4)"); 
 
 
     }
 
     }
 
     else {
 
     else {
         //for(i = 0; i < dropdownLinks.length; i++) {
+
         navbarLinks[0].style.height = 100%; // to ensure that the regular nav bar gets set back to regular height even after
        //   dropdownLinks[i].setAttribute("onclick", "");
+
                                            // the mobile nav has been opened and closed(which would set the height back to 0)
        //}
+
 
     }
 
     }
 
}   
 
}   

Revision as of 14:22, 23 August 2020