Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
function materializeLists() {
document.querySelectorAll('ul').forEach(function(ulEl) {
ulEl.classList.add('mdl-list');
ulEl.querySelectorAll('li').forEach(function(liEl) {
liEl.classList.add('mdl-list__item');
liEl.innerHTML = "<span class='mdl-list__item-primary-content'>" +
"<i class='material-icons mdl-list__item-icon'>home</i>" +
liEl.innerText + "</span>";
});
});
}
function materializeControls() {
materializeTextInputs();
materializeSelects();
materializeRadioButtons();
materializeCheckboxes();
materializeTables();
materializeLists();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment