Team:Cornell/templates/header
From 2012.igem.org
(Difference between revisions)
R.Lizarralde (Talk | contribs) |
R.Lizarralde (Talk | contribs) |
||
Line 30: | Line 30: | ||
links[1]="https://2012.igem.org/Team:Cornell/Sandbox/project/wetlab"; | links[1]="https://2012.igem.org/Team:Cornell/Sandbox/project/wetlab"; | ||
links[2]="somepage"; | links[2]="somepage"; | ||
+ | var prev = document.getElementById("prev"); | ||
+ | var next = document.getElementById("next"); | ||
+ | |||
for(var i=0;i<links.length;i++) { | for(var i=0;i<links.length;i++) { | ||
if(window.location.href.toString()==links[i]) { | if(window.location.href.toString()==links[i]) { | ||
+ | prev.style.display="block"; | ||
+ | next.style.display="block"; | ||
if(i==0) { | if(i==0) { | ||
- | + | prev.style.display="none"; | |
- | + | next.href=links[i+1]; | |
} | } | ||
else if(i==links.length-1) { | else if(i==links.length-1) { | ||
- | + | next.style.display="none"; | |
- | + | prev.href=links[i-1]; | |
} | } | ||
else { | else { | ||
- | + | prev.href=links[i-1]; | |
- | + | next.href=links[i+1]; | |
} | } | ||
//here once lay a return | //here once lay a return |
Revision as of 18:46, 19 June 2013