title: element.getAttribute() returns null when attribute has value
body: <p>The value of <code>elParentAttr</code> is <code>'level4'</code> the first time <code>traverseUp</code> is called but every time after is <code>null</code>. Why is this? Fiddle <a href="http://jsfiddle.net/szj9emgr/" rel="nofollow">here</a>.</p>
  
  <p>JavaScript:</p>
  
  <pre><code>function traverseUp(el, attr) {
      var elParent = el.parentNode,
          elParentAttr = el.parentNode.getAttribute(attr);
  
      console.log(elParent);
      console.log(elParentAttr);
  
      traverseUp(elParent);
  }
  
  traverseUp((document.getElementsByClassName('level5'))[0], 'class');
  </code></pre>
  
  <p>Document:</p>
  
  <pre><code>&lt;div class="level1"&gt;
      &lt;div class="level2"&gt;
          &lt;div class="level3"&gt;
              &lt;div class="level4"&gt;
                  &lt;div class="level5"&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>