Skip to content

Instantly share code, notes, and snippets.

@softiconic
Last active December 2, 2023 18:53
Show Gist options
  • Save softiconic/2b25873f5fea6562f5274eb310db12d0 to your computer and use it in GitHub Desktop.
Save softiconic/2b25873f5fea6562f5274eb310db12d0 to your computer and use it in GitHub Desktop.
div class on click – add or remove.
$('body').on('click', '.scths', function(event) {
if ($(this).hasClass('scteto')) {
$(".dsc").removeClass('scteto');
} else {
$(".dsc").removeClass('scteto');
$(this).addClass('scteto');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment