Disabled class? Sorry I haven't seen it


I have check my style sheet several times and for the life of me I don't see a class named disable. I can clearly see style effects when the class is applied but I don't see it anywhere in my document. Check for yourself.

body {
  font-family: 'Roboto', sans-serif;
  color: #404040;
  background-color: #eee;

.container {
  width: 520px;
  margin-top: 20px;

.button-group {
  margin-bottom: 20px;

.counter {
  display: inline;
  margin-top: 0;
  margin-bottom: 0;
  margin-right: 10px;

.posts {
  clear: both;
  list-style: none;
  padding-left: 0;
  width: 100%;

.posts li {
  background-color: #fff;
  border: 1px solid #d8d8d8;
  padding-top: 10px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  word-wrap: break-word;
  min-height: 42px;


Can we see the HTML regarding this exercise please? disabled is an HTML attribute, and it may or may not also be related to the bootstrap framework.


Here it is!!

 <!doctype html>
        <link href="http://s3.amazonaws.com/codecademy-content/courses/ltp2/css/bootstrap.min.css" rel="stylesheet">
        <link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
        <link href="style.css" rel="stylesheet">
        <div class="container">
            <div class="form-group">
              <textarea class="form-control status-box" rows="2" placeholder="What's on your mind?"></textarea>
          <div class="button-group pull-right">
            <p class="counter">140</p>
            <a href="#" class="btn btn-primary">Post</a>
          <ul class="posts">
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
        <script src="app.js"></script>


Thank you. So which part of this is causing you to wonder what disabled is?


The excersise has us add and remove the disabled class to the text entered in the status box. But like I said I don't see a class named disabled. maybe this will help you understand. Here is my .js file.

var main = function() {
    $('.btn').click(function() {
        var post = $('.status-box').val();
    $('.status-box').keyup(function() {
        var postLength = $(this).val().length;
        var charactersLeft = 140 - postLength;
        if (charactersLeft < 0){
        else if (charactersLeft >= 140){ 
            $('.btn').addClass('disabled');// <------ Here
            {$('.btn').removeClass('disabled');// <------ Here
        $('.btn').addClass('disabled'); // <----- and here


.disabled is a class provided by Bootstrap to change the cursor icon to a "not allowed" symbol :smile:
disabled (not dot) is an HTML attribute to "gray out" options.

Does that help? :smile:


I get it but I was confused by the .add Class method.


Yes, it's adding the .disabled to .btn.


Nice one.

I love codeacademy, but they do sometimes leave out explanations and just tell you to carry out an action. Which isn't great when you're trying to figure out the fundamentals of a language and its structure.

Mostly awesome though x


can the same be said for .dropdown-toggle? In the next exercise they have me add that class to an element on the page but it is also NOT listed on the style sheet.


Yup! That's a bootstrap-provided class.


I know right!! Did you know that an HTML element can have more than one class assigned to it in the opening HTML tag just by having a space? for instance

<div class="big dummy">
     What the what?!?!?

This div has 2 classes big and dummy. In the previous exercise with the status box they did this without explaining it or explaining why they did it. :rage: The status box had 2 classes .status-box and something else.


Sorry it's so unclear guys. Keep in mind these courses are very old and not to say that's OK but I will definitely agree they need some tuning up.

Let it be known, though, that the CC staff and course developers/writers are working on making these courses better.


I just looked up "bootstrap CSS classes on W3school's website and their is an entire section just for bootstrap classes! :dizzy_face:


:smile: good intuition.

You can also look on the official bootstrap page.


You guys are doing amazing work for sure.

I would never have started to learn code if it wasn't for Codecademy!

I'm just leaving feedback so future users will find it easier to learn :smile: