Created
June 29, 2017 06:28
-
-
Save baladkb/c7d7434a5abecf6631a04325813759e0 to your computer and use it in GitHub Desktop.
Replace class HTML name with JavaScript
This file contains hidden or 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
var els = [].slice.apply(document.getElementsByClassName("no-js")); | |
for (var i = 0; i < els.length; i++) { | |
els[i].className = els[i].className.replace(/ *\bno-js\b/g, "js"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment