Why its showng uncaught type error when i want to see the current output from the status box


#1



var main=function() {
    $('.btn').click(function() {
    var post =  $('.status-box').val();
    $('<li>').text(post).prependTo('.posts');
    $('.status-box').val('');
    $('.container').text("140");
    }); 
    $('.status-box').keyup(function(){
        var postlength=$(this).val().length();
        var characterleft=140-postlength;
        $('.counter').text(charcterleft);
    });
    
};
$(document).ready(main);


#2

Hi @jay1543,

Please post a link to the exercise you're on so we can help you.


#3

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