jQuery, make .click() which is within the last else statement, run the first if statement?
<p>Is it some how possible, to make the <code>$sliderPane.click();</code> which is located in the last <code>else</code> statement, run the first <code>if</code> statement? </p>

<p>Any clever ideas would be great thanks.</p>

<pre><code>$tabTwitter.on('click', function () {

    if ( twitterOpen == true ) {

        twitterOpen = false;
        $panelTwitter.fadeOut(500); 

        $sliderPane.animate({
            "left" : 0
        }, 500, function() {
            $sliderPane.removeAttr('style');                     
        });

    } else if ( facebookOpen == true ) {

        facebookOpen = false;
        $panelFacebook.fadeOut(500); 

        twitterOpen = true;
        $panelTwitter.fadeIn(500);

    } else {

        twitterOpen = true;
        $panelTwitter.fadeIn(500);

        $sliderPane.css({
            "left":0,"cursor":"pointer"
        }).animate({
            "left" : "-490px"
        }, 500, function() {
            $('body,html').animate({
                scrollTop: headerHeight - 69
            }, 800);
            return false;
        }).click();                 

    }

});
</code></pre>
