Use the jQuery addClass() function to give the classes animated and bounce to your button elements

Tell us what’s happening:
I am having trouble with the script element. The part that I’m confused about is $(“button”).addclass(“animated bounce”);

The objective is to Use the jQuery addClass() function to give the classes animated and bounce to your button elements.

Do I need to add something to the button elements?
Your code so far

<script>
  $(document).ready(function() {
$("button").addclass("animated bounce");
  });
</script>

<!-- Only change code above this line. -->

<div class="container-fluid">
  <h3 class="text-primary text-center">jQuery Playground</h3>
  <div class="row">
    <div class="col-xs-6">
      <h4>#left-well</h4>
      <div class="well" id="left-well">
        <button class="btn btn-default target" id="target1">#target1</button>
        <button class="btn btn-default target" id="target2">#target2</button>
        <button class="btn btn-default target" id="target3">#target3</button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target" id="target4">#target4</button>
        <button class="btn btn-default target" id="target5">#target5</button>
        <button class="btn btn-default target" id="target6">#target6</button>
      </div>
    </div>
  </div>
</div>

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (X11; CrOS x86_64 9334.72.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.140 Safari/537.36.

Link to the challenge:
https://www.freecodecamp.org/challenges/target-html-elements-with-selectors-using-jquery

You have a typo on your addclass function. JavaScript is case-sensitive. You just need to capitalize one of the letters of the function. Review the example in the challenge and you should be able to figure out the typo.

2 Likes

This was very helpful to me, thanks!