jquery after click event code example
Example 1: jquery bind click
$( "#foo" ).bind( "click", function() {
alert( "User clicked on 'foo.'" );
});
Example 2: jquery if else click function
$(document).ready(function(){
var n = $("#example div").length;
if (n < 2) {
$("body").css("background", "green");
}
else {
$("body").css("background", "orange");
}
});