Template:UCSF/Nav

From 2010.igem.org

(Difference between revisions)
Line 52: Line 52:
</ul>
</ul>
</div>
</div>
-
 
-
<script>
 
-
function setActive(){
 
-
if(document.URL=="http:\/\/2010.igem.org\/Team:UCSF"){
 
-
var HOME = document.getElementById('home');
 
-
HOME.className+="active";
 
-
return;
 
-
}
 
-
var UL = document.getElementsByTagName('li');
 
-
for(var i=0;i<UL.length;i++){
 
-
if(UL.id=="home"){continue;}
 
-
var iHTML = UL[i].innerHTML;
 
-
var hrefReg = /http:[^"]+/;
 
-
var REF = hrefReg.exec(iHTML);
 
-
if(document.URL.indexOf(REF)==0){
 
-
UL[i].className+=" active";
 
-
}
 
-
else{UL[i].className+=" not-active";}
 
-
}
 
-
}
 
-
</script>
 
</html>
</html>

Revision as of 04:53, 10 October 2010