Use jQuery to detect when any of the buttons are clicked code example
Example: detect button click jquery
$(".btn").click(function(){
var clk = $(this).attr("id");
});
$(".btn").click(function(){
var clk = $(this).attr("id");
});