Help! I am stuck on "Disable button 1 and 2"


#1

var main = function() {    
$('.btn').click(function() {
    var post= $('status-box').val();
    $('<li>').text(post).prependTo('.post');
    $('status-box').val('');
    $('.counter').text('140');
});
$('.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('disabled);
    }
    });
    
 $('.btn').addClass('disabled');
}
$(document).ready(main);

Messages: Oops, try again. Remember to add the line $('.btn').addClass('disabled'); outside your keyup event handler and Uncaught SyntaxError: Unexpected token ILLEGAL

Somebody please help me. I am stuck on 7. Disable button 1 after finally getting past 5. Count characters left.
I found answers in other threads but they are not working for me. After 2 days, this is driving me crazy and i would really like to move on to the next lesson.


#2

What exercise is it?


#3

Sorry, it is the Interactive Website: Status Update


#4

You need to close that quote.


#5

@zystvan is right, you needed to close removeClass('disabled') with apostrophe.


#6

also you need to change 'post' to 'posts' in
$('< li >').text(post).prependTo('.post'); -------->
$('< li >').text(post).prependTo('.posts');