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...") |
|||
Line 7: | Line 7: | ||
<script type='text/javascript'> | <script type='text/javascript'> | ||
+ | |||
+ | function annotate_all() { | ||
+ | $( ".annotation" ).each(function(elem) { | ||
+ | var e = $(this).attr('ref'); | ||
+ | var thise = $(this); | ||
+ | var apos = $(this).offset(); | ||
+ | var reff = $('#' + e); | ||
+ | var rpos = reff.offset(); | ||
+ | var opos = thise.position(); | ||
+ | opos.top = opos.top - apos.top + rpos.top; | ||
+ | |||
+ | thise.css({ | ||
+ | 'position' : 'absolute' , | ||
+ | 'top' : opos.top, | ||
+ | 'left' : opos.left | ||
+ | }); | ||
+ | console.log(opos.top); | ||
+ | console.log(rpos.top); | ||
+ | |||
+ | console.log(opos.top); | ||
+ | thise.position(opos); | ||
+ | var opos2 = thise.position(); | ||
+ | console.log(opos2); | ||
+ | }); | ||
+ | |||
+ | } | ||
function preload(arrayOfImages) { | function preload(arrayOfImages) { |
Revision as of 15:03, 11 September 2014