This JQuery works in Chrome and Safari, Not FF?
<p>I have a bunch of code that will open and close a div using the slidetoggle/toggleclass method</p>

<p>Now while the DIv is opened, I added in this little bit to allow the window to close if someone clicks outside of the now opened div.</p>

<pre><code>$("body").live("click", function() {
    if($(event.target).parents().index($('.subpanel')) == -1) 
    {
        if($('.subpanel').is(":visible"))
        {
            $(".alerts").toggleClass("notiftitleactive");
            $(".alerts").toggleClass("active").next().slideToggle(50);
            $("body").die("click");
        }
    }  
});
</code></pre>

<p>This works perfectly well in google chome and safari.  But in firefox, clicking outside of the div does nothing (does not trigger the .alerts to toggleclass/slidetoggle).</p>

<p>Any idea why this wouldnt work in FF ?</p>

<p>Thanks!</p>
