Team:Uppsala/Templates/TselectTier2

From 2014.igem.org

(Difference between revisions)
Line 13: Line 13:
{
{
document.getElementById("currentH").innerHTML = "Project";
document.getElementById("currentH").innerHTML = "Project";
-
                         createA("Adhesion", "https://2014.igem.org/Team:Uppsala/ProjectTest_AdhesionTest", "https://static.igem.org/mediawiki/2014/e/e1/Uppsala_igem2014_AdhesionV1.png");
+
                         createA("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", "https://static.igem.org/mediawiki/2014/0/0e/Uppsala_igem2014_Killing.png");
+
createA("https://2014.igem.org/Team:Uppsala/ProjectTest_KillingTest", "https://static.igem.org/mediawiki/2014/0/0e/Uppsala_igem2014_Killing.png");
-
createA("Sensing", "https://2014.igem.org/Team:Uppsala/ProjectTest_SensingTest", "https://static.igem.org/mediawiki/2014/1/17/Uppsala_igem2014_Sensing.png");
+
createA("https://2014.igem.org/Team:Uppsala/ProjectTest_SensingTest", "https://static.igem.org/mediawiki/2014/1/17/Uppsala_igem2014_Sensing.png");
-
createA("Targeting", "https://2014.igem.org/Team:Uppsala/ProjectTest_TargetingTest", "https://static.igem.org/mediawiki/2014/0/05/Uppsala_igem2014_Targeting.png");
+
createA("https://2014.igem.org/Team:Uppsala/ProjectTest_TargetingTest", "https://static.igem.org/mediawiki/2014/0/05/Uppsala_igem2014_Targeting.png");
              
              
}
}
Line 73: Line 73:
-
function createA(text, link, image) {
+
function createA(link, image) { <!-- a "text" element can be added here -->
var node = document.createElement("li");
var node = document.createElement("li");
var a = document.createElement('a');
var a = document.createElement('a');
Line 80: Line 80:
                         button.setAttribute("height", "157");
                         button.setAttribute("height", "157");
                         button.setAttribute("width", "157");
                         button.setAttribute("width", "157");
-
var linkText = document.createTextNode(text);
+
<!-- var linkText = document.createTextNode(text); (not needed if text is incorporated in button) --->
                         a.appendChild(button);
                         a.appendChild(button);
-
                         a.appendChild(linkText);
+
                         <!-- a.appendChild(linkText); (not needed if text is incorporated in button) --->
a.href = link;
a.href = link;
node.appendChild(a);
node.appendChild(a);

Revision as of 08:51, 22 July 2014