jQuery - Change the CSS of an Element Using jQuery

Tell us what’s happening:
my code is correct but the test is failing due
Your

target1

element should have red text.

Your code so far

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

**Your browser information:**

User Agent is: <code>Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36</code>

**Challenge:** jQuery - Change the CSS of an Element Using jQuery

**Link to the challenge:**
https://www.freecodecamp.org/learn/front-end-development-libraries/jquery/change-the-css-of-an-element-using-jquery

Ya, your code passes for me. Is it possible you have a browser extension installed that is changing the colors of the text? Does the #target1 text actually turn red in the preview pane?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.