Still not working


#1

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

var main = function() {
 $('.btn').click(function() {
   ...
 });
 
 $('.status-box').keyup(function() {
   var postLength = $(this).val().length;
   var charactersLeft = 140 - postLength; 
   $('.counter').text(charactersLeft); 
  });
}
$(document).ready(main);

#2

HI can you post all the code of this function

 $('.btn').click(function() {
   ...
 });

Because this part is fine

 $('.status-box').keyup(function() {
   var postLength = $(this).val().length;
   var charactersLeft = 140 - postLength; 
   $('.counter').text(charactersLeft); 
  });

#3

Hi this is the complete code

**var main = function() {
$('.btn').click(function() {
...
});

$('.status-box').keyup(function() {
var postLength = $(this).val().length;
var charactersLeft = 140 - postLength;
$('.counter').text(charactersLeft);
});
}
$(document).ready(main);var main = function() {
$('.btn').click(function() {
...
});

$('.status-box').keyup(function() {
var postLength = $(this).val().length;
var charactersLeft = 140 - postLength;
$('.counter').text(charactersLeft);
});
}
$(document).ready(main);**

and it says remember to update the '.counter' to show how many characters are left? do I have to bracket to counter?


#4

HI it's still missing this part

$('.btn').click(function() {
   ...
});

where you put teh ... it's where you have the code so you should also post this code


#5

Hi

I thought it was entered in already? where does it go?


#6

Hi you could go to the previous lesson and copy it