I have a button that triggers an animation. When I click the button again, it toggles the class but the opacity is still in my code after the animation. 

This happens for all the consequent clicks. How can I fix this? 

```
$( "#menu-button" ).click(function() {
    $("#right-sidebar").toggleClass("display");

    if($("#right-sidebar").hasClass("display") == false){
        $("#right-sidebar").css(opacity = "0");
    } else {
        $("#right-sidebar").animate({
            opacity: "1"
        }, "slow");
    }
});

```