jquery click event on class code example
Example 1: jquery bind click
$( "#foo" ).bind( "click", function() {
alert( "User clicked on 'foo.'" );
});
Example 2: jquery $(document.on click
$(document).on("click","#test-element",function() {});
$( "#foo" ).bind( "click", function() {
alert( "User clicked on 'foo.'" );
});
$(document).on("click","#test-element",function() {});