Team:Freiburg/test
From 2011.igem.org
(Difference between revisions)
Line 3: | Line 3: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
function hideSubmenu( elem ){ | function hideSubmenu( elem ){ | ||
- | var submenus= [ | + | var submenus= ['sub-team','sub-project']; |
for( var i=0; i<submenus.length; i++){ | for( var i=0; i<submenus.length; i++){ | ||
- | + | if (elem == 'none'){ | |
- | + | document.getElementById(submenus[i]).style.display = 'none'; | |
- | else | + | } |
- | + | else{ | |
- | + | if( submenus[i] != elem ){ | |
- | + | document.getElementById(submenus[i]).style.display = 'none'; | |
- | + | } | |
+ | else{ | ||
+ | document.getElementById(submenus[i]).style.display = 'block'; | ||
+ | } | ||
+ | } | ||
} | } | ||
} | } | ||
Line 248: | Line 252: | ||
<li class="sub2"><a href="#">safety</a></li> | <li class="sub2"><a href="#">safety</a></li> | ||
</ul> </li> | </ul> </li> | ||
- | <li><a href="#" display="block" onclick="hideSubmenu('none')">gallery</a> | + | <li><a href="#" display="block" onclick="hideSubmenu('none')">gallery</a> </li> |
- | <li><a href="https://2011.igem.org/Team:Freiburg/Sponsors" display="block" onclick="hideSubmenu('none')">sponsors</a> | + | <li><a href="https://2011.igem.org/Team:Freiburg/Sponsors" display="block" onclick="hideSubmenu('none')">sponsors</a> </li> |
</ul> | </ul> | ||
</div> | </div> |
Revision as of 16:02, 2 July 2011