detect if button is actually clicked or trigger through code jquery code example
Example: detect button click jquery
$(".btn").click(function(){
var clk = $(this).attr("id");
});
$(".btn").click(function(){
var clk = $(this).attr("id");
});