Count characters left


#1



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


Oops, try again. Remember to update the '.counter' to show how many characters are left.


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

});

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

$(document).ready(main) ;
. 
CAN I HAVE SOME HELP PLEASE!!!


#2

The above line does not look right. Where is the selector object?

$('<li>')

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.