I\'m trying to set conditions on a jQuery event. I have an input element and a div. I want to detect a click anywhere on the page and to execute that method but only if the clic
Example to exclude specific elements using a wildcard:
$("#mydiv li").click(function(e){
var Target = new String(e.target.id);
// prevent action when a element with id containing 'img_' is clicked
if( !Target.match(/img_/ )) {
// do something
}
});