Interactive Website


#1

Diable button 2 is not being understood by me as there is no answer in Q&A forum.This exercise is only remaining to pass.My code in the editor is same as given in Hint.
Pl reply where is the error.


#2

Hi Rajesh,

Could you please post all of the code you have in app.js? Thanks!


#3

var main = function() {

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

  • ').text(post).prependTo ('.posts');
    $('.status=box').val(' ');
    $('.counter').text('140');
    $('.btn').addClass('disabled');});
    $('.status-box').keyup(function() {
    var postLength = $(this).val().length ;var charactersLeft = 140 - postLength; $('.counter').text(charactersLeft);
    if(charactersLeft < 0) {
    $('.btn').addClass('disabled');}
    else if(charactersLeft =140) {
        $('.btn').addClass('disabled');
    }
        else {
         $('.btn').addClas('disabled'      );
      }
     });
     {
    
      $('.btn').addClass('enabled');}
    
     $(document).ready(main);