jQuery fancybox link inside div
<p>I have a div containing information. Wraped around the div I have a 'a' tag so that when a user clicks anywhere around the div the fancy box opens.</p>

<p>However inside the div I andother link that when clicked instead of opening the fancy box it deleted the whole div. I used return false in the click event for the delete which worked.</p>

<p>I have now had to add .live to the click because newly created elemnet were not getting the click event.</p>

<p>Since then though when I click the delete link the div does delete but the fancy box opens also.</p>

<p>Thanks for any help.</p>

<pre><code>        $(".listContent").live('mouseenter', function(){
         $(this).fancybox({
            'type':'ajax',
            });
        });

        $("div.removeCompare").live("click", function() {
            $(this).parents(".listingContainer").remove();                                          
            return false;
        });         
</code></pre>

<p>Div</p>

<pre><code>           &lt;div class="listingContainer grid_9 alpha omega"&gt;                    
                &lt;a class="listContent" href="adContent.html"&gt;
                    &lt;div class="listingWrapper"&gt;
                        &lt;div class="grid_8 alpha omega"&gt;
                        &lt;div class="listingContent"&gt;
                            &lt;div class="imgHolder"&gt;
                                &lt;img src="imgs/cars/SearchThumb-10053325.jpg" width="100" height="75"&gt;
                            &lt;/div&gt;
                            &lt;div class="descHolder"&gt;
                                &lt;div id="cars"&gt;&lt;/div&gt;                            
                                &lt;h3&gt;Fancy Car&lt;/h3&gt;&lt;div class="removeCompare"&gt;Remove&lt;/div&gt;
                                &lt;p&gt;Lorem ipsum dolor sit amet, pri ex duis maiorum commune, illud viderer suscipiantur eam an. Dolorum recteque qui in. Pro inani nulla tacimates ex, qu&lt;/p&gt;
                                &lt;span class="listingPrice"&gt;€4,000&lt;/span&gt;
                                &lt;span class="listingDate"&gt;Listed: Today&lt;/span&gt;
                                &lt;span class="listingLocation"&gt;Co. Waterford&lt;/span&gt;
                                &lt;span class="listingViews"&gt;Viewed: 20 Times&lt;/span&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="goTo goTo_unfocus grid_1 alpha omega"&gt;
                        &lt;div class="gotoWrapper"&gt;
                                Click to View
                                &lt;div class="imgVeiw"&gt;&lt;/div&gt;

                            &lt;/div&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;&lt;!--End listingWrapper--&gt;
                &lt;/a&gt;
            &lt;/div&gt;
</code></pre>
