# Give Each Element a Unique ID

**URL:** <https://forum.freecodecamp.org/t/give-each-element-a-unique-id/146305>\
**Category:** General\
**Created:** [September 6, 2017, 11:54am UTC](https://forum.freecodecamp.org/t/give-each-element-a-unique-id/146305 "2017-09-06T11:54:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bibi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bibi/32/64940_2.png) [@bibi](https://forum.freecodecamp.org/u/bibi)\
**Post date:** [September 6, 2017, 11:54am UTC](https://forum.freecodecamp.org/t/give-each-element-a-unique-id/146305/1 "2017-09-06T11:54:45Z")

</div>

**Tell us what’s happening:**

**Your code so far**

```auto
<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"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
    <div class="col-xs-6">
      <h4>#right-well</h4>
      <div class="well" id="right-well">
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
        <button class="btn btn-default target"></button>
      </div>
    </div>
  </div>
</div>

```

**Your browser information:**

Your Browser User Agent is: `Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36`.

**Link to the challenge:**  
[https://www.freecodecamp.org/challenges/give-each-element-a-unique-id](https://www.freecodecamp.org/challenges/give-each-element-a-unique-id)

---

<div class="post-metadata">

**Author:** ![bibi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/bibi/32/64940_2.png) [@bibi](https://forum.freecodecamp.org/u/bibi)\
**Post date:** [September 6, 2017, 11:56am UTC](https://forum.freecodecamp.org/t/give-each-element-a-unique-id/146305/2 "2017-09-06T11:56:07Z")

</div>

i don’t know how to Target the element with the id target3 and use the jQuery addClass() function to give it the class fadeOut.

---

<div class="post-metadata">

**Author:** ![kevcomedia](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevcomedia/32/125737_2.png) [@kevcomedia](https://forum.freecodecamp.org/u/kevcomedia)\
**Post date:** [September 6, 2017, 12:06pm UTC](https://forum.freecodecamp.org/t/give-each-element-a-unique-id/146305/3 "2017-09-06T12:06:04Z")

</div>

I think you linked to the wrong challenge. Maybe you meant [Target Elements by ID Using jQuery](https://www.freecodecamp.org/challenges/target-elements-by-id-using-jquery).

Anyway, at the top of the code there should be two examples on how to target specific elements and usage of the `addClass` function. There’s also an example of targetting elements by id in the instructions.

---

<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:40pm UTC](https://forum.freecodecamp.org/t/give-each-element-a-unique-id/146305/4 "2021-01-17T20:40:25Z")

</div>

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


