Last active
September 27, 2019 08:28
-
-
Save pointofpresence/54b97d8a67aab57a66d8555347c7e316 to your computer and use it in GitHub Desktop.
CSS class functions
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
function addClass(cls) { | |
this[0].classList.add(cls); | |
} | |
function removeClass(cls) { | |
this[0].classList.remove(cls); | |
} | |
function hasClass(cls) { | |
return this[0].classList.contains(cls); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment