jquery add div click event code example
Example 1: jquery bind click
$( "#foo" ).bind( "click", function() {
alert( "User clicked on 'foo.'" );
});
Example 2: set onclick jquery
$(elem).click(myFunc());
$( "#foo" ).bind( "click", function() {
alert( "User clicked on 'foo.'" );
});
$(elem).click(myFunc());