Can't figure out what's wrong on #7


#1

var =main=function() {

$('.btn').click(function() {
var post = $('.status-box').val();
$('

').text(post).prependTo('.posts');
$('.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 (characterLeft == 140) {
$('.btn').addClass('disabled');
}

else{
$('.btn').removeClass('disabled');
}

});

$('.btn').addClass('disabled');

$(document).ready(main);

Need help! ~Thanks


7.Disabled the button 1
#2

There is an unnecessary equals sign. Should be:

var main = function() {

#3

Hi Jes12315,

  1. When you declare a variable, you have one equal sign (=) after it, not one before it as well.
  2. You've forgotten to close main with a closing curly brace (}) on the fourth from last line.

Next time you ask a question, please:

  1. Include a link to the exercise you're on
  2. Post the error message you're getting
  3. Format your code properly:

#4

Thanks so much!!!!!!!!


#5

A post was split to a new topic: On 7. Disable Button 1 of the Interactive Website: Status Update, I am getting this error: "Unexpected token ILLEGAL"


#6