disabling onclick functionality parent/child container in jquery
<p>I want to overrule the onclick on a parent div, when an image-link in a child container is clicked.</p>

<p>I am using an onlick on a container called ".sight-title" to:
- change the class with toggleClass("active");
- change the content with an ajax call</p>

<p>initial state:</p>

<pre><code>&lt;div class="sight-title" id="S2851"&gt;
  &lt;div class="row1"&gt;&lt;/div&gt;
  &lt;div class="row2"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>after clicking: </p>

<pre><code>    &lt;div class="sight-title active" id="S2851"&gt; 
  &lt;div class="detail1"&gt;
    &lt;a class="wikilink" target="_blank" title="en.wikipedia.org/wiki/Marollen" href="http://en.wikipedia.org/wiki/Marollen"&gt;&lt;img src="img/contact/culisite_wikipedia.png" border="0"&gt;&lt;/a&gt;
  &lt;/div&gt;
  &lt;div class="detail2"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>when de the parent ".sight-title" is clicked again it changes back to the initial state.</p>

<p>But when the class="wikilinks" is clicked i don't want the onclick on the parent container to work.</p>

<p>jquery code: <strong>the else-part should be disabled when the class="wikilinks" is clicked...</strong></p>

<pre><code>$(".sight-title").click(function () {
                var id=$(this).attr("id");                                      
                $("#"+id).toggleClass("active");                    
                if($(this).hasClass("active")){
                    $("#"+id).html(ajax_load);  
                    $.get(  
                     loadUrlDetail+"?id="+id+'&amp;arrondissement='+arrondissement,  
                     {language: "php", version: 5},  
                     function(responseText){  
                         $("#"+id).html(responseText);  
                     },  
                     "html"  
                    );   
                } else {
                    $("#"+id).html(ajax_load);  
                    $.get(  
                     loadUrlTitle+"?id="+id+'&amp;arrondissement='+arrondissement,  
                     {language: "php", version: 5},  
                     function(responseText){  
                         $("#"+id).html(responseText);  
                     },  
                     "html"  
                    );  
                }
            });
</code></pre>
