Team:Aalto-Helsinki/Business
From 2014.igem.org
(Difference between revisions)
Vaakapallo (Talk | contribs) |
|||
Line 106: | Line 106: | ||
} else $('#navigation a.home').addClass('active'); | } else $('#navigation a.home').addClass('active'); | ||
}); | }); | ||
+ | </script> | ||
+ | <script type="text/javascript"> | ||
+ | // Picture reference script | ||
+ | /* | ||
+ | USAGE: | ||
+ | tag img with a ref that is connected to the image, such as: | ||
+ | <img src="aaltohelsinki.com/testikuva.png" ref="varioskan" /> | ||
+ | When you insert a reference in text, put a tag with a ref attribute: | ||
+ | <a ref="varioskan"></a> | ||
+ | Do not put href attribute, it will be replaced with a link to the image. | ||
+ | Moreover, inner html of the anchor tag will be "figure x" where x is the | ||
+ | correct figure number. | ||
+ | */ | ||
+ | var images = $('img[ref]'); | ||
+ | $.each(images, function(index, e){ | ||
+ | var referenceName = e.getAttribute("ref"); | ||
+ | if (!e.id){ | ||
+ | e.setAttribute("id","figure"+(index+1)); | ||
+ | } | ||
+ | $.each($('a[ref="'+referenceName+'"]'), function(j, e2){ | ||
+ | e2.setAttribute("href","#"+e.id); | ||
+ | e2.innerHTML = "figure" + (index+1); | ||
+ | }); | ||
+ | } | ||
+ | ); | ||
</script> | </script> | ||
</html> | </html> | ||
{{:Team:Aalto-Helsinki/footer}} | {{:Team:Aalto-Helsinki/footer}} |
Revision as of 19:56, 8 October 2014
Business
Finding out what biotech entrepreneurship takes.