JQUERY: How do I know if this element is currently open/closed (slidetoggle)
<p>Im using the following to open/close a div</p>

<pre><code>$(".alerts").click(function(){

    $(this).toggleClass("active").next().slideToggle(50);
</code></pre>

<p>But I want a certain function to trigger only if the box was closed and is being opened, how can I determine this?  I prefer not to use cookies or anything like that</p>

<p>thanks!</p>
