jQuery Slide Toggle help
<p>I have the following code:</p>

<pre><code>$("a.sticky-link").click(function (e) {
        e.preventDefault();

        $("div.stickies-box").slideToggle('slow');
        $("a.sticky-link").toggleClass("selected");
    });

    $("div.stickies-box").mouseup(function () {
        return false
    });
    $(document).mouseup(function (e) {
        if ($(e.target).parent("a.sticky-link").length == 0) {
            $("a.sticky-link").removeClass("selected");
            $("div.stickies-box").slideUp('slow');
        }
    });
</code></pre>

<p>Which basically shows and hides a div when a user clicks a button and then hides it should they click anywhere else on the page. The problem I have is if the box is already shown and the user clicks the button again (assuming they intend to hide the box) it will just quickly hide and reshow the box, when all I want it to do is hide the box.</p>

<p>Also instead of sliding can the effect be changed to actually moving up and down as the slide effect looks more like a wipe.</p>

<p>Thanks.</p>
