slideToggle, hidden or visible if statement
<p>I'm trying to work out an hide/show function according to, if the div's are hidden or not. My code looks like this: </p>

<pre><code>    //postInbox/outbox/savedbox show all/hide all
$('.postBoxShowAll').click(function(){
    $('.postBoxContent').slideToggle('fast', function(){
        if($(this).is(':hidden')){
            $('.postBoxShowAll').html('Show all');
        }else{
            $('.postBoxShowAll').html('Hide all');
        }
    });
});
//
</code></pre>

<p><strong>* UPDATE *</strong></p>

<p>This worked: </p>

<pre><code>    //postInbox/outbox/savedbox show all/hide all
$('.postBoxShowAll').click(function(){
    $('.postBoxContent').slideToggle('fast', function(){
        if($('.postBoxContent').is(':visible')){
            $('.postBoxShowAll').html('Hide all');
        }else{
            $('.postBoxShowAll').html('Show all');
        }
    });
});
//
</code></pre>

<p>But for some reason, it won't change the text. It slides just fine. How come? </p>
