Dynamically detect whether the div is slid down?
<p>I am using a div:</p>

<pre><code>&lt;div class="testDivClass" id="myDiv"&gt;&lt;/div&gt;
</code></pre>

<p>The div will be slid down and up with <code>$("#myDiv").slideDown()</code> and <code>$("#myDiv").slideUp()</code> respectively.</p>

<p>In certain scenario I want to slide up the div if it is visible, i.e. slid down. I tried a solution like using <code>$("#myDiv").slideToggle()</code> however this won't work as this will slide down the div if it's slide up. Is there any way using jQuery to know whether the div is slid down (visible) or not?</p>
