Team:HIT-Harbin/js/main.js

From 2014.igem.org

(Difference between revisions)
Line 9: Line 9:
function displaymenu(){
function displaymenu(){
var subMenu = document.getElementById("menubar");  
var subMenu = document.getElementById("menubar");  
-
subMenu[0].style.display = "block";  
+
subMenu.style.display = "block";  
}
}
function hidemenu() {  
function hidemenu() {  

Revision as of 13:42, 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.getElementById("menubar"); subMenu.style.display = "block"; } function hidemenu() { var subMenu = document.getElementById("menubar"); subMenu.style.display = "none"; }