Template:Team:Edinburgh/Code

From 2013.igem.org

(Difference between revisions)
Line 369: Line 369:
       for (var j=0; j< children.length; j++) {
       for (var j=0; j< children.length; j++) {
           if (children[j].tagName == "A") {
           if (children[j].tagName == "A") {
-
            if (window.location.href.indexOf(children[j].href,window.location.href.length - children[j].href.length) > -1) {
+
              if (window.location.href.indexOf("Team:Edinburgh/") > -1) {
-
                 if (active==1) active = 3;
+
                if (window.location.href.indexOf(children[j].href) > -1) {
 +
                    active = 3;
 +
                }
 +
              else if (window.location.href.indexOf(children[j].href, window.location.href.length - children[j].href.length) >-1) {
 +
                 active = 3;
               }
               }
           }
           }
Line 419: Line 423:
             for (var j=0; j< children.length; j++) {
             for (var j=0; j< children.length; j++) {
               if (children[j].tagName == "A") {
               if (children[j].tagName == "A") {
-
                     if (window.location.href.indexOf(children[j].href,window.location.href.length - children[j].href.length) > -1) {
+
                     if (window.location.href.indexOf(children[j].href) {
                         if (active==1) active = 3;
                         if (active==1) active = 3;
                     }
                     }

Revision as of 22:52, 3 October 2013