Do something if 'div' is display = none or != none
<p>I have a checkbox (checked = false) and a div ( display = none) when </p>

<ul>
<li>I click into checkbox - div will be display, checked = true </li>
<li>And click againt - div will be set display = none, checked = false.</li>
</ul>

<p>When I click into checkbox, I want to check if div is display ( set checked == true), show "slidingDiv show" and click into checkbox againt - div is display = none ( set checked == false), show "slidingDiv hidden".</p>

<pre><code>function ShowHide() {
            if ($("#slidingDiv").css(":display") == "none") {
                alert("slidingDiv display none.");
            }
            else {
                alert("slidingDiv show.");
            }

            $("#slidingDiv").animate({ "height": "toggle" }, { duration: 400 });
        }
</code></pre>

<p>Thank</p>
