ive been trying to get a sidebar to slide left and right depending on click.

I did try toggle could not get it to work.

I have now tried this code, it works when first clicked but once clicked for some reason it does not work when clicked again:

```
$('.pushbutton').on('click',function(){

        $('.left_sidebar, .footer').animate({left: "-320px"}, 800 );
        $('.main_body_right').animate({marginLeft: "25px"}, 800 );
        $('.pushbutton').animate({fontSize: "24px",fontWeight: "400",paddingTop: "3px"}, 500 );
        $('.pushbutton').html('+');
        $('.pushbutton').attr('class','pushbuttonplus');

    });

    $('.pushbuttonplus').on('click',function(){

        $('.left_sidebar, .footer').animate({left: "0px"}, 800 );
        $('.main_body_right').animate({marginLeft: "325px"}, 800 );
        $('.pushbuttonplus').animate({fontSize: "26px",fontWeight: "700",paddingTop: "0px"}, 500 );
        $('.pushbuttonplus').html('-');
        $('.pushbuttonplus').attr('class','pushbutton');

    });

```