Created
September 9, 2020 06:47
-
-
Save wpflames/06a68e937b260733009962ae1ef4b3a6 to your computer and use it in GitHub Desktop.
JavaScript toggle to add “active” class
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 toggle(){ | |
| var button = document.getElementById('btn-toggle'); | |
| button.classList.toggle('active'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment