JavaScript jQuery Basics Introducing jQuery Using text() and html()

Kathryn Notson
Kathryn Notson
22,501 Points

jQuery Basics > Introducing jQuery > Using text() and html()

This isn't functioning the way it's supposed to do on Challenge Task 2 of 3. The code appears correct.

index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Document</title>
</head>
<body>
    <h1 class="profile-header"></h1>
    <p class="profile-text"></p>

    <script
    src="jquery-3.2.1.min.js"></script>
    <script src="app.js"></script>
</body>
</html>
app.js
$(".profile-text").text("I am a web developer.");

3 Answers

Steven Parker
Steven Parker
98,202 Points

The challenges can be very picky about message contents!

The instructions say to set the contents of the ... element to "I am a web developer" :point_left: Note: there is no period in the message.

Kathryn Notson
Kathryn Notson
22,501 Points

Steven Parker:

Yes, I just figured it out on my own just before you emailed your response. More careful reading needed on my part. Instructors are VERY PARTICULAR & EXACTING with their answers to challenges.

Steven Parker
Steven Parker
98,202 Points

Kathryn Notson — Glad to help. You can mark the question solved by choosing a "best answer".
And happy coding!