Template:Team:Hannover/main.tmpl
From 2014.igem.org
(Difference between revisions)
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' | ||
+ | }); | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | $( document ).ready( annotate_all ); | ||
function preload(arrayOfImages) { | function preload(arrayOfImages) { |
Revision as of 13:07, 12 September 2014