Template:UCSF/subnav/Hello/BBB/AAA
From 2010.igem.org
(Difference between revisions)
Line 100: | Line 100: | ||
function getLadder(){ | function getLadder(){ | ||
var PageURL = document.URL; | var PageURL = document.URL; | ||
- | var reg = /http:\/\/2010\.igem\.org\/Template:UCSF(.*)/; | + | var reg = /http:\/\/2010\.igem\.org\/Template:UCSF\/(.*)/; |
var re = reg.exec(PageURL); | var re = reg.exec(PageURL); | ||
var result; | var result; | ||
Line 113: | Line 113: | ||
} | } | ||
var loc = "http:\/\/2010.igem.org\/Team:UCSF"; | var loc = "http:\/\/2010.igem.org\/Team:UCSF"; | ||
- | for(var j=1;j<=i;j++){loc+=result[j];} | + | for(var j=1;j<=i;j++){loc+="\/";loc+=result[j];} |
nav.innerHTML="<a href=\""+loc+"\">"+result[i]+"<\/a>"; | nav.innerHTML="<a href=\""+loc+"\">"+result[i]+"<\/a>"; | ||
if(nav.className=="current"){nav.innerHTML="<span>"+result[i].substr(1)+"<\/span>";} | if(nav.className=="current"){nav.innerHTML="<span>"+result[i].substr(1)+"<\/span>";} |
Revision as of 02:34, 10 October 2010