Prevent execution of parent event handler
<p>I have a tree of divs:</p>

<pre><code>&lt;div id="a" onclick="func"&gt;
    &lt;div id="b" onclick="func"&gt;
         &lt;div id="c" onclick="func"&gt;
         &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>When a click is made on a div it makes it's children invisible - ie click on "a" will turn "b" and "c" invisible.</p>

<pre><code>function func{
   if ($(childId).hasClass("visible")){
 $(childId).removeClass("visible");
 $(childId).addClass("invisible");
}
</code></pre>

<p>The problem is: a click on "b" will call "a"'s click and make "b" and "c" invisible. How do I disable the click on "a" using jQuery?</p>

<p>thanks</p>
