jquery if any click, check to see if clicked element has a class code example
Example 1: detect if an element has a class jQurey
$("#EL_ID").hasClass("CLASS_NAME");
Example 2: jquery if class clicked
$('.yourClass').click(function(e){
//do something here
});