jQuery Child is capturing clicks, only want Parent

Say i have this:

<div id="outer">
 <div id="inner">
 </div>
</div>

The outer div's dimensions are 500x500, and the inner is 100x100. I'm trying to employ the following:

$('#outer').click(function() {
    $('#outer').fadeOut();
});

But when you click on the 100x100 area of #inner, it still fades out. How to prevent this?

11
задан steve 4 November 2010 в 04:50
поделиться