# Changing Text with Click Events

**URL:** <https://forum.freecodecamp.org/t/changing-text-with-click-events/142509>\
**Category:** General\
**Created:** [August 18, 2017, 2:28pm UTC](https://forum.freecodecamp.org/t/changing-text-with-click-events/142509 "2017-08-18T14:28:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Norris\_mi](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/norris_mi/32/55062_2.png) [@Norris\_mi](https://forum.freecodecamp.org/u/Norris_mi)\
**Post date:** [August 18, 2017, 2:28pm UTC](https://forum.freecodecamp.org/t/changing-text-with-click-events/142509/1 "2017-08-18T14:28:37Z")

</div>

**Tell us what’s happening:**

I am lost with the $(".message"). portion, because the HTML code does not have a class of “message”.

**Your code so far**

```auto
<script>
  $(document).ready(function() {
    $("#getMessage").on("click", function(){
      // Only change code below this line.
      $(".message").html("Here is the message");
      // Only change code above this line.
    });
  });
</script>

<div class="container-fluid">
  <div class = "row text-center">
    <h2>Cat Photo Finder</h2>
  </div>
  <div class = "row text-center">
    <div class = "col-xs-12 well message">
      The message will go here
    </div>
  </div>
  <div class = "row text-center">
    <div class = "col-xs-12">
      <button id = "getMessage" class = "btn btn-primary">
        Get Message
      </button>
    </div>
  </div>
</div>

```

**Your browser information:**

Your Browser User Agent is: `Mozilla/5.0 (Windows NT 10.0; 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/change-text-with-click-events](https://www.freecodecamp.org/challenges/change-text-with-click-events)

---

<div class="post-metadata">

**Author:** ![ArielLeslie](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/arielleslie/32/264841_2.png) [@ArielLeslie](https://forum.freecodecamp.org/u/ArielLeslie)\
**Post date:** [August 18, 2017, 3:54pm UTC](https://forum.freecodecamp.org/t/changing-text-with-click-events/142509/2 "2017-08-18T15:54:05Z")

</div>

```auto
<div class = "col-xs-12 well message">

```

---

<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 16, 2021, 6:06pm UTC](https://forum.freecodecamp.org/t/changing-text-with-click-events/142509/4 "2021-01-16T18:06:01Z")

</div>

Closed on January 16, 2021, 6:06pm UTC


