$(document).on("click",".appDetails", function () { var clickedBtnID = $(this).attr('id'); // or var clickedBtnID = this.id alert('you clicked on button #' + clickedBtnID); });