jQuery: click function exlude children.
- by superUntitled
Trying to wrap my head around the jQuery ".not()" function, and running into a problem. I would like to have the parent div to be "clickable" but if a user clicks on a child element, the script is not called.
$(this).not(children()).click(function(){
$(".example").fadeOut("fast");
});
the html:
<div class="example">
<div>
<p>This content is not affected by clicks.</p>
</div>
</div>