on click get id of btn code example
Example: How to get ID of button user just clicked?
$("button").click(function() {
alert(this.id); // or alert($(this).attr('id'));
});
$("button").click(function() {
alert(this.id); // or alert($(this).attr('id'));
});