JQuery: How do I determine if a slideToggle has been toggled?

Posted by Timj on Stack Overflow See other posts from Stack Overflow or by Timj
Published on 2010-04-23T05:42:14Z Indexed on 2010/04/23 5:53 UTC
Read the original article Hit count: 234

How do I do the following pseudo code in JQuery?

$(document).ready(function(){
    $(".btn-slide").click(function(){
        $("#divToSlide").slideToggle("fast");
        if ($(this).isToggled) {  // <---- DOESN'T WORK -------
            // do something when toggled
        } else {
            // do something different when not toggled
        }
    });  
});

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript