How to cancel click event of container div trigger when click elements which inside container in JQuery!?

Posted by qinHaiXiang on Stack Overflow See other posts from Stack Overflow or by qinHaiXiang
Published on 2011-02-23T15:06:54Z Indexed on 2011/02/23 15:25 UTC
Read the original article Hit count: 152

Filed under:
|

E.g

<div class="container">
  <div class="inside">I am not fire when click me</div>
</div>

$('.container').click(function(){
  // container do something here
});

but,when I click the div inside it also trigger the container's click event because the div is inside the container, so , I need a way to prevent the container event trigger when I click on the inside div!

Thank you very much!!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about events