if button is clicked jquery code example
Example 1: detect button click jquery
$(".btn").click(function(){
var clk = $(this).attr("id");
});
Example 2: jquery if class clicked
$('.yourClass').click(function(e){
//do something here
});
$(".btn").click(function(){
var clk = $(this).attr("id");
});
$('.yourClass').click(function(e){
//do something here
});