Team:Freiburg/Templates/header
From 2011.igem.org
(Difference between revisions)
Line 7: | Line 7: | ||
function windowLoadMenu(){ | function windowLoadMenu(){ | ||
var url = document.URL; | var url = document.URL; | ||
- | |||
var splitted = new Array(); | var splitted = new Array(); | ||
if (url.search("2011.igem.org/Team:Freiburg/")<0){ | if (url.search("2011.igem.org/Team:Freiburg/")<0){ | ||
Line 18: | Line 17: | ||
} | } | ||
var id = 'sub-'+ url; | var id = 'sub-'+ url; | ||
- | |||
hideSubmenu(id); | hideSubmenu(id); | ||
- | |||
highlightMenuItem(url); | highlightMenuItem(url); | ||
} | } | ||
function highlightMenuItem(id){ | function highlightMenuItem(id){ | ||
- | |||
if(document.getElementById(id) != null){ | if(document.getElementById(id) != null){ | ||
document.getElementById(id).style.fontWeight=''; | document.getElementById(id).style.fontWeight=''; | ||
Line 36: | Line 32: | ||
function hideSubmenu( elem ){ | function hideSubmenu( elem ){ | ||
- | |||
var submenus= ['sub-team','sub-project', 'sub-home', 'sub-gallery', 'sub-sponsors']; | var submenus= ['sub-team','sub-project', 'sub-home', 'sub-gallery', 'sub-sponsors']; | ||
for( var i=0; i<submenus.length; i++){ | for( var i=0; i<submenus.length; i++){ | ||
Line 50: | Line 45: | ||
if(document.getElementById(submenus[i]) != null){ | if(document.getElementById(submenus[i]) != null){ | ||
document.getElementById(submenus[i]).style.display = "block"; | document.getElementById(submenus[i]).style.display = "block"; | ||
- | + | // document.getElementById(submenus[i]).getElementsByTagName('span').style.display='block'; | |
} | } | ||
} | } |
Revision as of 08:38, 4 July 2011