Team:HIT-Harbin/js/main.js

From 2014.igem.org

(Difference between revisions)
Line 7: Line 7:
subMenu.style.display = "none";  
subMenu.style.display = "none";  
}
}
-
function displaymenu(x){
+
function displaymenu(){
var subMenu = document.getElementsByTagName("noprint");  
var subMenu = document.getElementsByTagName("noprint");  
-
subMenu[x].style.display = "block";  
+
subMenu[0].style.display = "block";
 +
subMenu[1].style.display = "block";  
}
}
-
function hidemenu(x) {  
+
function hidemenu() {  
var subMenu = document.getElementsByTagName("noprint");  
var subMenu = document.getElementsByTagName("noprint");  
-
subMenu[x].style.display = "none";  
+
subMenu[0].style.display = "none";
 +
subMenu[1].style.display = "none";  
}
}

Revision as of 13:34, 22 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 displaymenu(){ var subMenu = document.getElementsByTagName("noprint"); subMenu[0].style.display = "block"; subMenu[1].style.display = "block"; } function hidemenu() { var subMenu = document.getElementsByTagName("noprint"); subMenu[0].style.display = "none"; subMenu[1].style.display = "none"; }