Team:Freiburg/Templates/html/js.html

From 2014.igem.org

(Difference between revisions)
m
Line 2: Line 2:
<script>
<script>
(function(){
(function(){
-
   var DEBUG = false;
+
   var DEBUG = true;
   // grab navigation links
   // grab navigation links
   var navLinks = document.getElementsByTagName('nav');
   var navLinks = document.getElementsByTagName('nav');
Line 15: Line 15:
     if (DEBUG) console.log(href);
     if (DEBUG) console.log(href);
     var indexOfPath = href.indexOf(currentPath);
     var indexOfPath = href.indexOf(currentPath);
 +
    if (DEBUG) console.log("indexofPath: " + indexOfPath);
     if (indexOfPath !== -1 && indexOfPath >= href.length - currentPath.length - 1){
     if (indexOfPath !== -1 && indexOfPath >= href.length - currentPath.length - 1){
       // set active state
       // set active state

Revision as of 18:01, 7 October 2014