Last active
December 2, 2023 18:53
-
-
Save softiconic/2b25873f5fea6562f5274eb310db12d0 to your computer and use it in GitHub Desktop.
div class on click – add or remove.
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
$('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