Team:Uppsala/Templates/TselectTier2
From 2014.igem.org
(Difference between revisions)
Line 3: | Line 3: | ||
<ul id="tabSection"> | <ul id="tabSection"> | ||
- | |||
</ul> | </ul> | ||
Line 14: | Line 13: | ||
{ | { | ||
document.getElementById("currentH").innerHTML = "Project"; | document.getElementById("currentH").innerHTML = "Project"; | ||
- | createA("Adhesion", "https://2014.igem.org/Team:Uppsala/ProjectTest_AdhesionTest"); | + | createA("Adhesion", "https://2014.igem.org/Team:Uppsala/ProjectTest_AdhesionTest", 'https://static.igem.org/mediawiki/2014/e/e1/Uppsala_igem2014_AdhesionV1.png'); |
createA("Killling", "https://2014.igem.org/Team:Uppsala/ProjectTest_KillingTest"); | createA("Killling", "https://2014.igem.org/Team:Uppsala/ProjectTest_KillingTest"); | ||
createA("Sensing", "https://2014.igem.org/Team:Uppsala/ProjectTest_SensingTest"); | createA("Sensing", "https://2014.igem.org/Team:Uppsala/ProjectTest_SensingTest"); | ||
Line 74: | Line 73: | ||
- | function createA(text, link) { | + | function createA(text, link, image) { |
var node = document.createElement("li"); | var node = document.createElement("li"); | ||
var a = document.createElement('a'); | var a = document.createElement('a'); | ||
+ | var button = document.createElement('img'); | ||
+ | var buttonLink = document.createTextNode(image); | ||
var linkText = document.createTextNode(text); | var linkText = document.createTextNode(text); | ||
a.appendChild(linkText); | a.appendChild(linkText); | ||
a.href = link; | a.href = link; | ||
+ | button.appendChild(buttonLink); | ||
+ | node.appendChild(button); | ||
node.appendChild(a); | node.appendChild(a); | ||
document.getElementById("tabSection").appendChild(node); | document.getElementById("tabSection").appendChild(node); |
Revision as of 14:25, 19 July 2014