Team:LMU-Munich/Templates/Page Header

From 2012.igem.org

(Difference between revisions)
(hopefully fixed some IE8 menu bugs (i'll be able to test this tomorrow, let's hope it does not break anything))
(another iteration for trying to fix the IE bug)
Line 310: Line 310:
}
}
-
function addEvent(ele, evnt, func) {
+
function addEvent(ele, ev, func) {
if (ele.addEventListener) {
if (ele.addEventListener) {
-
ele.addEventListener(evnt,func,false);
+
ele.addEventListener(ev,func,false);
} else if (ele.attachEvent) {
} else if (ele.attachEvent) {
-
ele.attachEvent("on"+evnt, func);
+
ele.attachEvent("on" + ev, func);
}
}
}
}
for(var i = 0; i < lis.length; ++i) {
for(var i = 0; i < lis.length; ++i) {
-
var li = lis[i];
+
// create a new closure to pass down the li variable
-
li.my_opacity = 0.0;
+
// no idea why the assignment is needed…
-
addEvent(li, "mouseover", function() {
+
var a = function() {
-
if(this.timeout != null) {
+
var li = lis[i];
-
window.clearTimeout(this.timeout);
+
li.my_opacity = 0.0;
-
this.timeout = null;
+
addEvent(li, "mouseover", function() {
-
}
+
if(li.timeout != null) {
-
var timeout = this.my_opacity > 0 ? 25 : 200;
+
window.clearTimeout(this.timeout);
-
this.delta_opacity = 1.0/8;
+
li.timeout = null;
-
var mythis = this;
+
}
-
this.timeout = window.setTimeout(function() {
+
var timeout = li.my_opacity > 0 ? 25 : 200;
-
nav_animator(mythis);
+
li.delta_opacity = 1.0/8;
-
}, timeout);
+
li.timeout = window.setTimeout(function() {
-
});
+
nav_animator(li);
-
addEvent(li, "mouseout", function() {
+
}, timeout);
-
if(this.timeout != null) {
+
});
-
window.clearTimeout(this.timeout);
+
addEvent(li, "mouseout", function() {
-
this.timeout = null;
+
if(li.timeout != null) {
-
}
+
window.clearTimeout(this.timeout);
-
var timeout = this.my_opacity < 1 ? 25 : 200;
+
li.timeout = null;
-
this.delta_opacity = -1.0/8;
+
}
-
var mythis = this;
+
var timeout = li.my_opacity < 1 ? 25 : 200;
-
this.timeout = window.setTimeout(function() {
+
li.delta_opacity = -1.0/8;
-
nav_animator(mythis);
+
li.timeout = window.setTimeout(function() {
-
}, timeout);
+
nav_animator(li);
-
});
+
}, timeout);
 +
});
 +
}();
}
}

Revision as of 16:16, 8 August 2012

iGEM Ludwig-Maximilians-Universität München Beadzillus

Team-LMU Sidebar Home.jpg

The LMU-Munich team is exuberantly happy about the great success at the World Championship Jamboree in Boston. Our project Beadzillus finished 4th and won the prize for the "Best Wiki" (with Slovenia) and "Best New Application Project".

IGEM HQ LMU prize.jpg

[ more news ]