get id of clicked element jquery code example
Example 1: jquery get element id
$(this).attr('id')
Example 2: how to get the id of button clicked in jquery
$("button").click(function() {
alert(this.id); // or alert($(this).attr('id'));
});
Example 3: jquery get id
var myId = $("#test").prop("id");