I try to write these code to make grid view through CSS:( jsbin )
var tables = document.getElementsByClassName(\'tableData\'); var rows = tables[0].getEle
Two years later (2012/06), there is a new and shiny approach - element.classList with methods add(), remove(), toggle(), contains().
add()
remove()
toggle()
contains()
rows[i].classList.add("alt");
Supported by