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

Justin Townsend
Justin Townsend
4,720 Points

I am really sorry but i have no clue what i am doing I watched the videos 5 times already and still I have no clue

how do I make this a JQuery file and how do I had a hide()?

1 Answer

Hi Justin

The challenge is asking you to convert the vanilla JavaScript into JQuery.

remember JQuery is just a javascript library so it lives within a normal javascript file extension.

The difference is JQuery has these helpful functions that do all this long JavaScript code for us.

The hide() function replaces the style.display = 'none';

// This line of code
document.querySelector('.profile-header').style.display = 'none';

//Is identical to this line of code
$('.profile-header').hide();

JQuery has many helpful functions just like this one, check out the documentation for more

Good Luck

Justin Townsend
Justin Townsend
4,720 Points

Mr. Clarke thank you so much I really appreciate your help!