Team:Heidelberg/Templates/StartPage

From 2013.igem.org

(Difference between revisions)
m
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];
-
alert(item.tagName);
 
while (item.tagName !== "UL") {
while (item.tagName !== "UL") {
-
var item = item.nextSibling;
+
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) {
-
alert("expand");
+
var ul = drop_list;
-
var visible = drop_list.nextSibling.nextSibling.style.display;
+
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].nextSibling.nextSibling.style.display = "none";
+
var item = drop_lists[i];
 +
while (item.tagName !== "UL") {
 +
var item = item.nextSibling;
 +
}
 +
item.style.display = "none";
}
}
if (visible == "none") {
if (visible == "none") {
-
drop_list.nextSibling.nextSibling.style.display = "block";
+
ul.style.display = "block";
} else {
} else {
-
drop_list.nextSibling.nextSibling.style.display = "none";
+
ul.style.display = "none";
}
}
}
}

Revision as of 15:20, 16 August 2013

PHILOSOPHER'S STONE

igem-2013

{{{1}}}

Go to top