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 = window.location
var url = window.location
var myNavi, myNaviElement, myNaviLink;
var myNavi, myNaviElement, myNaviLink;
-
// get navi bar
 
myNavi = document.getElementById('navi');
myNavi = document.getElementById('navi');
-
// main entries in navi menu
+
myNaviElement = myNavi.children[0].children[0];
-
myNaviElement = myNavi.children[0].children[0]; // first li
+
myNaviLink;
myNaviLink;
for (i = 0; i < myNavi.children[0].children.length; i++) {
for (i = 0; i < myNavi.children[0].children.length; i++) {
-
         myNaviLink = myNaviElement.children[0]; // first a in li
+
         myNaviLink = myNaviElement.children[0];
         if (myNaviLink.href == url.href) {
         if (myNaviLink.href == url.href) {
                 myNaviLink.style.color = 'red';
                 myNaviLink.style.color = 'red';
-
                // change some image based on id here...
 
-
                /*
 
-
                someImage = document.getElementById('someImage');
 
-
                someImage.src = 'path/to/image';
 
-
                */
 
         }
         }
         myNaviElement = myNaviElement.nextElementSibling;
         myNaviElement = myNaviElement.nextElementSibling;
}
}
 +
-->
</script>
</script>
</head>
</head>

Revision as of 21:25, 6 October 2009