code: function(node, ignoreSelfAndKids) {
      // First check for kids if those aren't being ignored
      if (!ignoreSelfAndKids && node.firstElementChild) {
        return node.firstElementChild;
      }
      // Then for siblings...
      if (node.nextElementSibling) {
        return node.nextElementSibling;
      }
      // And finally, move up the parent chain *and* find a sibling
      // (because this is depth-first traversal, we will have already
      // seen the parent nodes themselves).
      do {
        node = node.parentNode;
      } while (node && !node.nextElementSibling);
      return node && node.nextElementSibling;
    }
docs: Traverse the DOM from node to node, starting at the node passed in.
  Pass true for the second parameter to indicate this node itself
  (and its kids) are going away, and we want the next node over.
  
  Calling this in a loop will traverse the DOM depth-first.