# Can't figure it out!

**URL:** <https://forum.freecodecamp.org/t/cant-figure-it-out/155753>\
**Category:** General\
**Created:** [October 28, 2017, 10:32pm UTC](https://forum.freecodecamp.org/t/cant-figure-it-out/155753 "2017-10-28T22:32:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bourget](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@bourget](https://forum.freecodecamp.org/u/bourget)\
**Post date:** [October 28, 2017, 10:32pm UTC](https://forum.freecodecamp.org/t/cant-figure-it-out/155753/1 "2017-10-28T22:32:39Z")

</div>

**Tell us what’s happening:**

Your #target1 element should have the classes animated‚ shake and btn-primary…  
I can not get passed this part with for the life of me, what am I doing wrong??  
**Your code so far**

```auto
<script>
  <script>
  $(document).ready(function() {
    $("button").addClass("animated");
    $(".btn").addClass("shake");
    $("#target1").addClass("animated shake btn-primary");
  });
</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 (Macintosh; Intel Mac OS X 10_12) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50`.

**Link to the challenge:**  
[https://www.freecodecamp.org/challenges/target-the-same-element-with-multiple-jquery-selectors](https://www.freecodecamp.org/challenges/target-the-same-element-with-multiple-jquery-selectors)

---

<div class="post-metadata">

**Author:** ![Puukallistaja](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@Puukallistaja](https://forum.freecodecamp.org/u/Puukallistaja)\
**Post date:** [October 28, 2017, 11:04pm UTC](https://forum.freecodecamp.org/t/cant-figure-it-out/155753/2 "2017-10-28T23:04:39Z")

</div>

Read the task one more time.

Although it is possible to add multiple classes in a single .addClass() call, let’s add them to the same element in three separate ways.

Using .addClass(), add only one class at a time to the same element, three different ways.

Cheers and good luck!

---

<div class="post-metadata">

**Author:** ![bourget](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@bourget](https://forum.freecodecamp.org/u/bourget)\
**Post date:** [October 28, 2017, 11:35pm UTC](https://forum.freecodecamp.org/t/cant-figure-it-out/155753/3 "2017-10-28T23:35:18Z")

</div>

its still not making sense to me lol I’ve tied a ton of different ways and when do one it cancels out the other and vice versa

---

<div class="post-metadata">

**Author:** ![Puukallistaja](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@Puukallistaja](https://forum.freecodecamp.org/u/Puukallistaja)\
**Post date:** [October 28, 2017, 11:37pm UTC](https://forum.freecodecamp.org/t/cant-figure-it-out/155753/4 "2017-10-28T23:37:31Z")

</div>

```auto
$("button").addClass("animated");
$(".btn").addClass("shake");

```

after ONLY these lines, what classes does #target1 have?

---

<div class="post-metadata">

**Author:** ![bourget](https://avatars.discourse-cdn.com/v4/letter/b/df788c/32.png) [@bourget](https://forum.freecodecamp.org/u/bourget)\
**Post date:** [October 28, 2017, 11:41pm UTC](https://forum.freecodecamp.org/t/cant-figure-it-out/155753/5 "2017-10-28T23:41:18Z")

</div>

says to add btn-primary to #target1, along with the other two. I must be overthinking this…

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:36pm UTC](https://forum.freecodecamp.org/t/cant-figure-it-out/155753/6 "2021-01-17T20:36:08Z")

</div>

Closed on January 17, 2021, 8:36pm UTC


