Team:LMU-Munich/Templates/Page Header

From 2012.igem.org

(Difference between revisions)
(mascot + script)
Line 478: Line 478:
</div>
</div>
<html>
<html>
-
<img id="mascot" alt="Sporenfreunde" src="http://2012.igem.org/wiki/images/e/e3/Team_LMU_Sporenfreunde.png">
+
<div id="mascot"><img alt="Sporenfreunde" src="http://2012.igem.org/wiki/images/e/e3/Team_LMU_Sporenfreunde.png"></div>
</div>
</div>
<script type="text/javascript">
<script type="text/javascript">
Line 501: Line 501:
}
}
-
window.onscroll = window.onresize = function() {
+
function scroll() {
-
var x = get_x(dummy);
+
var distance_bottom = window.innerHeight - 127 - (get_y(dummy) - ((document.body.parentElement) ? document.body.parentElement.scrollTop : 0));
-
var y = get_y(dummy);
+
-
var scroll = document.body.scrollTop;
+
if(distance_bottom > 75) {
-
var height = window.innerHeight;
+
-
var distance_bottom = height - 127 - (y - scroll);
+
-
 
+
-
if(distance_bottom > 50) {
+
mascot.style.position = "fixed";
mascot.style.position = "fixed";
-
mascot.style.left = x;
+
mascot.style.left = get_x(dummy) + "px";
-
mascot.style.top = height - 127 - 50;
+
mascot.style.top = (window.innerHeight - 127 - 75) + "px";
 +
dummy.style.height = "127px";
} else {
} else {
mascot.style.position = "static";
mascot.style.position = "static";
 +
dummy.style.height = 0;
}
}
-
dummy.innerHTML = "hello" + distance_bottom;
 
}
}
-
window.onscroll();
+
window.onscroll = scroll;
 +
window.onresize = scroll;
 +
scroll();
</script>
</script>
<div id="right">
<div id="right">
Line 557: Line 555:
{{:Team:LMU-Munich/Templates/Page Footer}}
{{:Team:LMU-Munich/Templates/Page Footer}}
</noinclude>
</noinclude>
-
a id="logo_beadzillus" href="http://2012.igem.org/Team:LMU-Munich">
 

Revision as of 18:18, 25 September 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 ]

Sporenfreunde