Template:Template HD

From 2009.igem.org

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

Revision as of 21:29, 6 October 2009