Skip to content

Instantly share code, notes, and snippets.

@paullacey78
Created August 21, 2018 10:19
Show Gist options
  • Save paullacey78/463268663eddacd9625d26d1f027d4ce to your computer and use it in GitHub Desktop.
Save paullacey78/463268663eddacd9625d26d1f027d4ce to your computer and use it in GitHub Desktop.
function classToggle() {
this.classList.toggle('class1');
this.classList.toggle('class2');
}
document.querySelector('#div').addEventListener('click', classToggle);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment