Template:UCSF/Nav

From 2010.igem.org

(Difference between revisions)
Line 54: Line 54:
<script>
<script>
-
var UL = document.getElementById('h');
+
var UL = document.getElementsByTagName('li');
-
alert(UL);
+
for(var i=0;i<UL.length;i++){
 +
var iHTML = UL[i].innerHTML;
 +
var hrefReg = /http:[^"]+/;
 +
var REF = hrefReg.exec(iHTML);
 +
if(document.URL.indexOf(REF)==0){
 +
UL[i].className+=" active";
 +
}
 +
}
</script>
</script>
</html>
</html>

Revision as of 04:42, 10 October 2010