Template:Team:Hannover/new main.tmpl

From 2014.igem.org

(Difference between revisions)
(Created page with "<html> <body> <div id="banner"> <a style="display:block; height:100%"> <a href="https://2014.igem.org/Team:Hannover"></a> </div> <script type='text/javascript'> function preload...")
 
(2 intermediate revisions not shown)
Line 7: Line 7:
<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 36:
}
}
-
// Preload images..
+
function preload_menu() {
-
preload([
+
    preload([
     'https://static.igem.org/mediawiki/2014/4/4a/20140909_MENU-NEW-HOME.gif',
     'https://static.igem.org/mediawiki/2014/4/4a/20140909_MENU-NEW-HOME.gif',
     'https://static.igem.org/mediawiki/2014/7/7f/20140909_MENU-NEW-PROJECT.gif',
     'https://static.igem.org/mediawiki/2014/7/7f/20140909_MENU-NEW-PROJECT.gif',
Line 21: Line 43:
     'https://static.igem.org/mediawiki/2014/1/15/20140909_MENU-NEW-HUMAN-PRACTICE.gif',
     'https://static.igem.org/mediawiki/2014/1/15/20140909_MENU-NEW-HUMAN-PRACTICE.gif',
     'https://static.igem.org/mediawiki/2014/0/06/20140909_MENU-NEW-TEAM.gif'
     'https://static.igem.org/mediawiki/2014/0/06/20140909_MENU-NEW-TEAM.gif'
-
]);
+
    ]);
 +
}
 +
 
 +
function onready() {
 +
    annotate_all();
 +
    preload_menu();
 +
}
 +
 
 +
$( document ).ready( onready );
</script>
</script>
</body>
</body>
</html>
</html>

Latest revision as of 16:35, 11 September 2014