Skip to content

Instantly share code, notes, and snippets.

@alansemenov
Created June 22, 2016 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alansemenov/bef8e20c305c04fcb94146ba10dac3e1 to your computer and use it in GitHub Desktop.
Save alansemenov/bef8e20c305c04fcb94146ba10dac3e1 to your computer and use it in GitHub Desktop.
function materializeTables() {
document.querySelectorAll('table').forEach(function(table) {
table.classList.add('mdl-data-table', 'mdl-js-data-table');
table.querySelectorAll('th,td').forEach(function(cell) {
cell.classList.add('mdl-data-table__cell--non-numeric');
});
});
}
function materializeControls() {
materializeTextInputs();
materializeSelects();
materializeRadioButtons();
materializeCheckboxes();
materializeTables();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment