8/9 Disable button 2


#1



https://www.codecademy.com/en/courses/web-beginner-en-hk5qh/0/8?content_from=make-an-interactive-website%3Ajquery-dom-manipulation


My code is completely right . But it doesn't disable button every time i press post button after typing a message.
I have tried reloading page several times

var main =function () {
    $('.btn').click(function (){
        var post=$(".status-box").val();
        $("<li>").text(post).prependTo('.posts');
        $('.status-box').val(''); 
        $('.counter').text('140');
        $('.btn').addClass('disabled'); 
        });
        $('.status-box').keyup(function (){
            var postLength=$(this).val().length;
            var charactersLeft=140-postLength;
            $('.counter').text(charactersLeft);
            if(charactersLeft<0){
                $('.btn').addClass('disabled');
                }
            else if(charactersLeft==140){
            $('.btn').addClass('disabled');
            }
            else
            $('.btn').removeClass();
        });
            $('.btn').addClass('disabled');
    }
    $(document).ready(main);

#2

@zawlinnaing,

Have a close look at

$('.btn').removeClass();


#3

I dont get it. What is wrong with removeClass?


#4

@zawlinnaing,

A little further hint:
How should .removeClass() know, which class it actually should remove?