Skip to content

Instantly share code, notes, and snippets.

@wpflames
Created November 27, 2020 18:04
Show Gist options
  • Select an option

  • Save wpflames/3ae7bf691cb10736fd21fd2dc5973470 to your computer and use it in GitHub Desktop.

Select an option

Save wpflames/3ae7bf691cb10736fd21fd2dc5973470 to your computer and use it in GitHub Desktop.
jQuery - Add class / remove class
jQuery('.YOUR_CLASS').on('click', function() {
jQuery('.YOUR_CLASS').removeClass('active');
jQuery(this).addClass('active');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment