Disable button 2 Ex 8


#1

Thanks for writing the full code for exercise 8 'disable button 2' but I carefully
checked with my code but it is not passing and following is remark in the editor.

Oops,try again.Remember to disable the Post button after posting a new message.
Does it mean that on the screen 'I have to write some text message' in the box 'What is in your mind' then press the 'Save & submit ' .
Below I giving the full code sent by you in the editor.

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

#2

Below I giving the full code sent by you in the editor.
var main = function() {
$('.btn').click(function[() {

you made a spelling mistake you put " [ " in $('.btn').click(function[() {