Team:Uppsala/Templates/TselectTier2
From 2014.igem.org
(Difference between revisions)
(Created page with "<div id="tab_selector"> <ul id="tabs"> <li><a href="#" title="tab1">One</a></li> <li><a href="#" title="tab2">Two</a>...") |
|||
(103 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
+ | <html> | ||
<div id="tab_selector"> | <div id="tab_selector"> | ||
- | <ul id=" | + | <ul id="tabSection"> |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</ul> | </ul> | ||
</div> | </div> | ||
+ | <script> | ||
+ | var data = window.location.href; | ||
+ | var List = document.getElementById("links"); | ||
- | + | if (data.search("Project") !== -1) | |
+ | { | ||
+ | document.getElementById("currentH").innerHTML = "Project"; | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Project_Sensing", "https://static.igem.org/mediawiki/2014/2/2c/Uppsala_igem2014_SensingV2.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Project_Targeting", "https://static.igem.org/mediawiki/2014/5/55/Uppsala_igem2014_TargetingV2.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Project_Killing", "https://static.igem.org/mediawiki/2014/c/c7/Uppsala_igem2014_KillingV2.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Project_Adhesion", "https://static.igem.org/mediawiki/2014/d/d4/Uppsala-igem2014Adhesion_labe.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Project_Notebook", "https://static.igem.org/mediawiki/2014/8/82/Uppsala-igem2014Notebook.png"); | ||
+ | $('#header').css('background-image', 'url(https://static.igem.org/mediawiki/2014/7/76/Uppsala_iGEM2014_Team_headerPro_new.png)'); | ||
+ | var myNode = document.getElementById("imgwrapNH"); | ||
+ | while (myNode.firstChild) { | ||
+ | myNode.removeChild(myNode.firstChild); | ||
+ | } | ||
+ | } | ||
+ | else if (data.search("Modeling")!== -1) | ||
+ | { | ||
+ | document.getElementById("currentH").innerHTML = '<img style="width:15%" src="https://static.igem.org/mediawiki/2014/c/c1/Uppsala2014_Modeling.png"> Modeling'; | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Modeling_CellCellInteraction", "https://static.igem.org/mediawiki/2014/a/af/Uppsala2014_Cell-Cell_interaction.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Modeling_PopulationLevel", "https://static.igem.org/mediawiki/2014/a/a2/Uppsala2014_Population_level.png"); | ||
+ | $('#header').css('background-image', 'url(https://static.igem.org/mediawiki/2014/3/3e/Uppsala_iGEM2014_Team_Mod.png)'); | ||
+ | var myNode = document.getElementById("imgwrapNH"); | ||
+ | while (myNode.firstChild) { | ||
+ | myNode.removeChild(myNode.firstChild); | ||
+ | } | ||
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | else if (data.search("Policy")!== -1) | |
+ | { | ||
+ | document.getElementById("currentH").innerHTML = "Policy & Practices"; | ||
+ | createA("https://2014.igem.org/Team:Uppsala/PolicyPractices_MicrobialDesigns", "https://static.igem.org/mediawiki/2014/0/0a/Uppsala2014_Microbial_Designs.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/PolicyPractices_Outreach", "https://static.igem.org/mediawiki/2014/7/78/Uppsala2014_Outreach.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/PolicyPractices_BusinessPlan", "https://static.igem.org/mediawiki/2014/a/a8/Uppsala2014_Buisness_plan.png"); | ||
+ | $('#header').css('background-image', 'url(https://static.igem.org/mediawiki/2014/f/fd/Uppsala_iGEM2014_Team_HP.png)'); | ||
- | + | var myNode = document.getElementById("imgwrapNH"); | |
- | + | while (myNode.firstChild) { | |
- | + | myNode.removeChild(myNode.firstChild); | |
- | + | } | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | } | + | |
- | + | else if (data.search("Team") !== -1) | |
+ | { | ||
+ | document.getElementById("currentH").innerHTML = "Team"; | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Team_SensingGroup", "https://static.igem.org/mediawiki/2014/2/2c/Uppsala_igem2014_SensingV2.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Team_TargetingGroup", "https://static.igem.org/mediawiki/2014/5/55/Uppsala_igem2014_TargetingV2.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Team_KillingGroup", "https://static.igem.org/mediawiki/2014/c/c7/Uppsala_igem2014_KillingV2.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Team_AdhesionGroup", "https://static.igem.org/mediawiki/2014/d/d4/Uppsala-igem2014Adhesion_labe.png"); | ||
+ | createA("https://2014.igem.org/Team:Uppsala/Team_ModelingGroup", "https://static.igem.org/mediawiki/2014/5/51/Uppsala-igem2014Modelinglabe.png"); | ||
- | </ | + | } |
+ | else | ||
+ | { | ||
+ | alert("Sorry something failed"); | ||
+ | } | ||
+ | |||
+ | |||
+ | function createA(link, image) { <!-- a "text" element can be added here --> | ||
+ | var node = document.createElement("li"); | ||
+ | var a = document.createElement('a'); | ||
+ | var button = document.createElement("img"); | ||
+ | button.src = image; | ||
+ | button.setAttribute("height", "157"); | ||
+ | button.setAttribute("width", "157"); | ||
+ | <!-- var linkText = document.createTextNode(text); (not needed if text is incorporated in button) ---> | ||
+ | a.appendChild(button); | ||
+ | <!-- a.appendChild(linkText); (not needed if text is incorporated in button) ---> | ||
+ | a.href = link; | ||
+ | node.appendChild(a); | ||
+ | document.getElementById("tabSection").appendChild(node); | ||
+ | } | ||
+ | |||
+ | </script> | ||
+ | |||
+ | |||
+ | </html> |
Latest revision as of 21:23, 16 October 2014