code: function(parentNode, reverse, ofType) {
        parentNode._counted = true;
        if (reverse) {
          for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
            var node = nodes[i];
            if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
          }
        } else {
          for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
            if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
        }
      }
docs: mark each child node with its position (for nth calls) "ofType" flag indicates whether we're indexing for nth-of-type rather than nth-child