title: Add class to an element
body: <p>I try to write these code to make grid view through <code>CSS:( jsbin )</code></p>
  <pre><code>var tables = document.getElementsByClassName('tableData');
  var rows = tables[0].getElementsByTagName('tr');
  for(var i = 1; i &lt; rows.length; i += 2) {
    alert(rows[i]);
    rows[i].className = &quot;alt&quot;;
  }
  </code></pre>
  <p>This only works with the tr elements has <code>class=&quot;&quot;</code>. But if I want to add class to tr.</p>
  <p>I've tried <code>Core.addClass</code> but it doesn't work.</p>
  <p>​</p>