Template:Team:HKU-HKBU/script.js

From 2009.igem.org

(Difference between revisions)
Line 188: Line 188:
   var aNodes = document.getElementsByTagName("a");
   var aNodes = document.getElementsByTagName("a");
     for (var i = 0; i < aNodes.length; i++) {
     for (var i = 0; i < aNodes.length; i++) {
-
       if (aNodes[i].getAttribute("href") != null){
+
       if (aNodes[i].getAttribute("href")) != null){
       if (aNodes[i].getAttribute("href").value == document.URL) {
       if (aNodes[i].getAttribute("href").value == document.URL) {
         aNodes[i].style.backgroundPosition="0% -42px";
         aNodes[i].style.backgroundPosition="0% -42px";

Revision as of 12:26, 18 October 2009