check if a div is hidden or not while using a toggle
<p>i am using a toggle function such that when i click on a button a div shows up and when i again click that button it hides . but the problem is i also have one more close button in the div that closes the div, it means when i clicked the button the toggle was incomplete and when i try to open the div again through that toggle button then first it completes the toggle means again hide the already hidden div and then again show it , any solution for that ?</p>

<pre><code>$(".stngs").toggle(function() {
    $(".stngsubmenu").css({
        display: 'block'
    });
}, function() {    
    $(".stngsubmenu").css({
        display: 'none'
    });
});​
</code></pre>
