exists anyway to get the class when the click event is fired. My code, as shown below, works only for id, but not for class.
HTML:
<html> <body> <a href="#" id="kana1" class="konbo">click me 1</a> <a href="#" id="kana2" class="kinta">click me 2</a> </body> </html>
JQuery
$(document).ready(function() { $("a").click(function(event) { alert(event.target.id+" and "+event.target.class); }); });
jsfiddle code here
javascript jquery javascript-events
Redbox Jun 14 2018-12-12T00: 00Z
source share