Created
October 8, 2019 17:13
-
-
Save matheusmurta/20bab7d5a32533d15cb8c506c1d6156a to your computer and use it in GitHub Desktop.
Jquery Get Class Name Cliked Element
This file contains 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
$('div').click(function() { | |
var theClass = this.className; // "this" is the element clicked | |
alert( theClass ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment