Team:HIT-Harbin/js/main.js

From 2014.igem.org

(Difference between revisions)
Line 6: Line 6:
var subMenu = div.getElementsByTagName("ul")[0];  
var subMenu = div.getElementsByTagName("ul")[0];  
subMenu.style.display = "none";  
subMenu.style.display = "none";  
 +
}
 +
function sideMenu(x){
 +
var arr=document.getElementsByTagName("rnav");
 +
for (var i=0; i<6; i++ ) {
 +
        if (arr[i].style.display == "block" ) {
 +
            arr[i].style.display == "none";
 +
        }
 +
        var y=x-1;
 +
        arr[y].style.display == "block";
 +
    }
}
}

Revision as of 03:31, 23 July 2014

function displaySubMenu(div) { var subMenu = div.getElementsByTagName("ul")[0]; subMenu.style.display = "block"; } function hideSubMenu(div) { var subMenu = div.getElementsByTagName("ul")[0]; subMenu.style.display = "none"; } function sideMenu(x){ var arr=document.getElementsByTagName("rnav"); for (var i=0; i<6; i++ ) {

       if (arr[i].style.display == "block" ) {
           arr[i].style.display == "none";
       }
       var y=x-1;
       arr[y].style.display == "block";
   }

}