Team:Freiburg/Templates/html/js.html
From 2014.igem.org
(Difference between revisions)
m |
|||
Line 16: | Line 16: | ||
var indexOfPath = href.indexOf(currentPath); | var indexOfPath = href.indexOf(currentPath); | ||
if (DEBUG) console.log("indexofPath: " + indexOfPath); | if (DEBUG) console.log("indexofPath: " + indexOfPath); | ||
- | if (indexOfPath | + | if (indexOfPath === -1) continue; |
+ | if (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 18:03, 7 October 2014