Template:Team:HKU-HKBU/script.js
From 2009.igem.org
(Difference between revisions)
Line 185: | Line 185: | ||
function modifyTopBar(){ | function modifyTopBar(){ | ||
- | var el | + | var el = document.getElementById("tabs"); |
var aNodes = el.getElementsByTagName("a"); | var aNodes = el.getElementsByTagName("a"); | ||
for (var i = 0; i < aNodes.length; i++) { | for (var i = 0; i < aNodes.length; i++) { | ||
- | if (aNodes[i].getAttribute("href") | + | if (aNodes[i].getAttribute("href") == document.URL) { |
aNodes[i].style.backgroundPosition="0% -42px"; | aNodes[i].style.backgroundPosition="0% -42px"; | ||
var sNode = aNodes[i].getElementsByTagName("span")[0]; | var sNode = aNodes[i].getElementsByTagName("span")[0]; |
Latest revision as of 12:38, 18 October 2009