Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript jQuery Basics Introducing jQuery jQuery Syntax and Animation Effects

I cannot get the code to work for this question

the code I have written is

$('.profile-header').hide();

and I get a XBummer message

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

    <script
    src="jquery-3.2.1.min.js"></script>
    <script src="app.js"></script>
</body>
</html>
app.js
document.querySelector('.profile-header').style.display = 'none';
$(".profile-header").hide();

I have tried both ('.profile-header') and (".profile-header") and neither works

3 Answers

Adam - accept a โ€œthank youโ€ best answer and let it be. My error was in tagging me for best answer rather than you. I am so new at coding i am ground zero. You kindly helped me out and I appreciate it. Now how about you refrain from beating me up.

Adam Beer
Adam Beer
11,314 Points

Hihihi. Sorry, I was surprised. It was just strange the situation. Your solution was good, the task was not clear and you didn't know that the first line should be deleted. I hope I didn't hurt you. The way you go is good, don't give up! If you have any questions, don't hesitate, we will help! Good evening and happy coding! :)

Thank you Adam!! That did it!

Good man! Thank you from a โ€œgreenieโ€!