Created
June 22, 2016 18:58
-
-
Save alansemenov/1f0a8ed805b29219bb8a1b87ad89e3f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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