Template:Team:Hannover/main.tmpl
From 2014.igem.org
(Difference between revisions)
(11 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
+ | <head> | ||
+ | <script src="/Team:Hannover/jquery-1.11.0.min?action=raw&type=text/javascript" type="text/javascript"></script> | ||
+ | <script src="/Team:Hannover/lightbox.min?action=raw&type=text/javascript" type="text/javascript"></script> | ||
+ | </head> | ||
<body> | <body> | ||
<div id="banner"> | <div id="banner"> | ||
Line 7: | Line 11: | ||
<script type='text/javascript'> | <script type='text/javascript'> | ||
+ | function annotate_all() { | ||
+ | // Move all annotations to the height of the referred element. | ||
+ | $( ".annotation" ).each(function(elem) { | ||
+ | var thise = $(this); | ||
+ | var e = thise.attr('ref'); | ||
+ | var reff = $('#' + e); | ||
+ | if (reff) { | ||
+ | var apos = thise.offset(); | ||
+ | var rpos = reff.offset(); | ||
+ | var opos = thise.position(); | ||
+ | opos.top = opos.top - apos.top + rpos.top - 10; | ||
+ | thise.css({ | ||
+ | 'vi' : 'absolute' , | ||
+ | 'top' : opos.top, | ||
+ | 'left' : opos.left, | ||
+ | 'visibility' : 'visible' | ||
+ | }); | ||
+ | } | ||
+ | }); | ||
+ | } | ||
+ | |||
function preload(arrayOfImages) { | function preload(arrayOfImages) { | ||
Line 14: | Line 39: | ||
} | } | ||
- | // Preload images.. | + | function preload_menu() { |
- | preload([ | + | // Preload images.. |
+ | preload([ | ||
'https://static.igem.org/mediawiki/2014/8/88/Hannover_20140901_MENU-HUMAN-PRACTICE.gif', | 'https://static.igem.org/mediawiki/2014/8/88/Hannover_20140901_MENU-HUMAN-PRACTICE.gif', | ||
'https://static.igem.org/mediawiki/2014/3/3d/Hannover_20140901_MENU-TEAM.gif', | 'https://static.igem.org/mediawiki/2014/3/3d/Hannover_20140901_MENU-TEAM.gif', | ||
'https://static.igem.org/mediawiki/2014/7/7d/Hannover_20140901_MENU-PROJECT.gif', | 'https://static.igem.org/mediawiki/2014/7/7d/Hannover_20140901_MENU-PROJECT.gif', | ||
'https://static.igem.org/mediawiki/2014/c/cd/Hannover_20140901_MENU-HOME.gif' | 'https://static.igem.org/mediawiki/2014/c/cd/Hannover_20140901_MENU-HOME.gif' | ||
- | ]); | + | ]); |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | $( document ).ready( annotate_all ); | |
- | + | $( window ).resize( annotate_all ); | |
- | + | $( document ).ready( preload_menu ); | |
- | + | </script> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</body> | </body> | ||
</html> | </html> |
Latest revision as of 13:49, 1 October 2014