Team:Freiburg/Templates/html/js.html

From 2014.igem.org

(Difference between revisions)
Line 14: Line 14:
     var href = navLinks[i].getAttribute('href')
     var href = navLinks[i].getAttribute('href')
     if (DEBUG) console.log(href);
     if (DEBUG) console.log(href);
-
     if (href.indexOf(currentPath) !== -1){
+
     var indexOfPath = href.indexOf(currentPath);
 +
    if (indexOfPath !== -1 && indexOfPath >= href.length - currentPath.length - 1){
       // set active state
       // set active state
       if (DEBUG) console.log('Setting active state for: ' + href);
       if (DEBUG) console.log('Setting active state for: ' + href);

Revision as of 17:59, 7 October 2014