7.Disable the button 1


I don't know what the problem is.Please check below
My code:
var main = function() {

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

  • ').text(post).prependTo('.posts');


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

    if (charactersLeft < 0) {

    else if (characterLeft == 140) {



  • #2

    You are not closing-of the =main= function with a closing-curly-bracket-}...
    and you are not executing the =main= function by using the jQuery ready() facility


    have a read

    and it would be nice to see the HTML-code you use within your jQuery-statement,

    re-edit your Post

    • leave one blank-line above of your code
    • select your code in the Post
    • then =click= on the </>-symbol-of-this-editor

    Your code will then be in a pre-code state
    and you will be able to make/present the proper indentations.

    or even better use
    = http://discuss.codecademy.com/t/using-backticks-to-format-your-code/3697



    # status update

    class-name disabled....

    Where is style for that class?
    Styling is an Attribute of an Element.
    In the style.css-file
    I was wondering where is disabled class.

    The "disabled" class-name is -set- by you via the Javascript app.js
    as an additional class Attribute of
    the a-Element, which you identify by the class-name "btn"

    The sole purpose of the "disabled" class-name
    is to have an indication, if the
    identified by the class-name "status-box"
    has 1 or more characters -set-

    If the a-Element has the _"disabled" class-name as a class Attribute set,
    the Button-Functionality is Blocked.
    ( you use the Bootstrap-functionality )