$("div").click(function(e) {
if($(e.target).is('p')){
e.preventDefault();
return;
}
alert("woohoo!");
});
check the target of the click. this way you dont need to bind another event.
$("div").click(function(e) {
if($(e.target).is('p')){
e.preventDefault();
return;
}
alert("woohoo!");
});
check the target of the click. this way you dont need to bind another event.