Template:Template HD

From 2009.igem.org

(Difference between revisions)
m
Line 408: Line 408:
</style>
</style>
<script type="text/javascript">
<script type="text/javascript">
 +
var url = document.URL;
 +
var myNavi = document.getElementById('navigation');
 +
var myNaviElementmy = Navi.children[0].children[0];
 +
var myNaviLink;
-
window.onload=function(){
+
myNaviLink;
-
 
+
for (i = 0; i < myNavi.children[0].children.length; i++) {
-
for (i=0; i<anz; i++)
+
        myNaviLink = myNaviElement.children[0];
-
{
+
        if (myNaviLink.href == url.href) {
-
    if (document.getElementsByTagName("a")[i].href == document.URL)
+
                myNaviLink.style.color = 'red';
-
    {
+
        }
-
        document.getElementsByTagName("a")[i].style.color = "red";
+
        myNaviElement = myNaviElement.nextElementSibling;
-
    }
+
}
}
-
}
 
-
 
</script>
</script>
</head>
</head>

Revision as of 21:42, 6 October 2009