Team:Freiburg/Templates/html/inlinejs.html

From 2014.igem.org

(Difference between revisions)
Line 5: Line 5:
   // grab navigation links
   // grab navigation links
   var navLinks = document.getElementsByTagName('nav');
   var navLinks = document.getElementsByTagName('nav');
-
  if (DEBUG) {
+
   if (navLinks.length > 0) navLinks = navLinks[0];
-
    console.log('All found nav elements');
+
-
    console.dir(navLinks);
+
-
  }
+
-
   if (navLinks.length > 0) navLinks = navLinks.item(0);
+
-
  if (DEBUG) {
+
-
    console.log('First nav element');
+
-
    console.dir(navLinks);
+
-
  }
+
   navLinks = navLinks.getElementsByTagName('a');
   navLinks = navLinks.getElementsByTagName('a');
-
  if (DEBUG) {
 
-
    console.log('Anchor Elements in the first nav element');
 
-
    console.dir(navLinks);
 
-
  }
 
   // check all links' href attributes for equality with url
   // check all links' href attributes for equality with url

Revision as of 17:47, 7 October 2014