Team:Heidelberg/Templates/StartPage
From 2013.igem.org
(Difference between revisions)
JuliaS1992 (Talk | contribs) m |
JuliaS1992 (Talk | contribs) m |
||
Line 28: | Line 28: | ||
for (var i = 0; i < drop_lists.length; i++) { | for (var i = 0; i < drop_lists.length; i++) { | ||
var item = drop_lists[i]; | var item = drop_lists[i]; | ||
- | |||
while (item.tagName !== "UL") { | while (item.tagName !== "UL") { | ||
- | + | var item = item.nextSibling; | |
} | } | ||
item.style.display = "none"; | item.style.display = "none"; | ||
Line 49: | Line 48: | ||
} | } | ||
function expand_left_navi(drop_list) { | function expand_left_navi(drop_list) { | ||
- | + | var ul = drop_list; | |
- | + | while (ul.tagName !== "UL") { | |
+ | var ul = drop_list.nextSibling; | ||
+ | } | ||
+ | var visible = ul.style.display; | ||
var drop_lists = document.getElementsByClassName("drop-navi-left"); | var drop_lists = document.getElementsByClassName("drop-navi-left"); | ||
for (var i = 0; i < drop_lists.length; i++) { | for (var i = 0; i < drop_lists.length; i++) { | ||
- | drop_lists[i]. | + | var item = drop_lists[i]; |
+ | while (item.tagName !== "UL") { | ||
+ | var item = item.nextSibling; | ||
+ | } | ||
+ | item.style.display = "none"; | ||
} | } | ||
if (visible == "none") { | if (visible == "none") { | ||
- | + | ul.style.display = "block"; | |
} else { | } else { | ||
- | + | ul.style.display = "none"; | |
} | } | ||
} | } |
Revision as of 15:20, 16 August 2013