Template:UCSF/subnav/Hello/BBB/AAA

From 2010.igem.org

(Difference between revisions)
 
(19 intermediate revisions not shown)
Line 1: Line 1:
<html>
<html>
<style>
<style>
-
 
+
#breadcrumbs ul{margin:0;padding:0;}
-
li{
+
-
list-style:none;
+
-
margin:0px;
+
-
padding:0px;
+
-
font:11px arial,helvetica,clean,sans-serif;
+
-
}
+
-
  ul,li{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 makesubNav(){
 
-
 
-
}
 
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\/Team:UCSF(.*)/;
var re =  reg.exec(PageURL);
var re =  reg.exec(PageURL);
var  result;
var  result;
result=re[1].split("\/");
result=re[1].split("\/");
-
alert(result.length);
 
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 113: Line 112:
     }
     }
     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]+"<\/span>";}
     subnav.appendChild(nav);
     subnav.appendChild(nav);
   }
   }
}
}
-
 
</script>
</script>
-
 
-
<body>
 
-
<header>
 
-
<div id="breadcrumbs">
 
-
<nav>
 
-
<ul id="sub-navigation">
 
-
                    <li class="first parent parent-1"><a href="https://2010.igem.org/Team:UCSF">Home</a></li>
 
-
</ul>
 
-
</nav>
 
-
</div>
 
-
</header>
 
-
 
-
<script>getLadder();</script>
 
-
</body>
 
</html>
</html>

Latest revision as of 03:34, 10 October 2010