Template:UCSF/subnav/Hello/BBB/AAA
From 2010.igem.org
(Difference between revisions)
(18 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
<html> | <html> | ||
<style> | <style> | ||
- | + | #breadcrumbs ul{margin:0;padding:0;} | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
#sub-navigation { | #sub-navigation { | ||
margin: 0; | margin: 0; | ||
} | } | ||
+ | #breadcrumbs{ | ||
+ | height:20px; | ||
+ | width:auto; | ||
+ | border:1px black solid; | ||
+ | padding: 1px; | ||
+ | } | ||
#breadcrumbs li { | #breadcrumbs li { | ||
+ | list-style:none; | ||
+ | margin:0px; | ||
+ | padding:0px; | ||
+ | font:11px arial,helvetica,clean,sans-serif; | ||
padding: 0; | padding: 0; | ||
float: left; | float: left; | ||
Line 95: | Line 98: | ||
<script> | <script> | ||
- | |||
- | |||
- | |||
function getLadder(){ | function getLadder(){ | ||
var PageURL = document.URL; | var PageURL = document.URL; | ||
- | var reg = /http:\/\/2010\.igem\.org\/ | + | var reg = /http:\/\/2010\.igem\.org\/Team:UCSF(.*)/; |
var re = reg.exec(PageURL); | var re = reg.exec(PageURL); | ||
var result; | var result; | ||
result=re[1].split("\/"); | result=re[1].split("\/"); | ||
- | |||
var subnav=document.getElementById('sub-navigation'); | var subnav=document.getElementById('sub-navigation'); | ||
for (var i=1;i<result.length;i++){ | for (var i=1;i<result.length;i++){ | ||
Line 115: | Line 114: | ||
for(var j=1;j<=i;j++){loc+="\/";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] | + | if(nav.className=="current"){nav.innerHTML="<span>"+result[i]+"<\/span>";} |
subnav.appendChild(nav); | subnav.appendChild(nav); | ||
} | } | ||
} | } | ||
- | |||
</script> | </script> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
</html> | </html> |
Latest revision as of 03:34, 10 October 2010