Confused on "Change Text Inside an Element Using jQuery"

Confused on "Change Text Inside an Element Using jQuery"
0

#1

Tell us what’s happening:


<script>
  $(document).ready(function() {
    $("#target1").css("color", "red");
    $("#target4").html("<em>target4</em>");
  });
</script>

Here is what’s weird. On the viewer side, Target 1 is red as it should be from a previous exercise and target 4 is italicized. I have the following two items incorrect:

  1. Emphasize the text in your target4 button by adding HTML tags.
  2. Make sure the text is otherwise unchanged. Whether I use button id=target4 or simply target4 in the 2nd half after .html, I am still missing these two items. I tried without the tags, but the directions seemed to explicitly want emphasis. I also tried "button id=“target4"”) and simply target4 without quotes in that 2nd half.

Thanks!


#2
I forgot the # here: ("<em>#target4</em>") . Now, it's fixed. I thought I got most details, but I will keep trying to pay better attention. Thanks anyhow.