matheusmurta
10/8/2019 - 5:13 PM

Jquery Get Class Name Cliked Element

Jquery Get Class Name Cliked Element

$('div').click(function() {
    var theClass = this.className;  // "this" is the element clicked
    alert( theClass );
});