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

Including jQuery in our Project - Task 3 of 5

"In the second script tag, write the jQuery code that you'd use to select all elements with the class of "removable".

I'm really stuck on this, Can anyone help me out?

5 Answers

Casey Ydenberg
Casey Ydenberg
15,622 Points

jQ selectors are of the form $('something') where something is usually some CSS-like syntax.

So if you can think of a CSS text that will select items of a specific class, you should be all set ...

Hi thanks for you reply, Ive finally managed to crack it.

Thank you

Remember, in this task all you are doing is selecting, so don't over think it. First step is to locate the two script tags. Once you find them insert your code into the second one. Remember jq selecters are the same as css selectors, so you would you select the class remove in css? Put that in the format that Casey demonstrated above, and you should be good to go.

Hey Richard, I know you figured it out but here's the code for this specific step:

Code removed

That's all you need. It's just asking to call all elements with the class removable. Pretty simple. Cheers.

James Barnett
James Barnett
39,199 Points

keith gulbro - I've redacted the answer code from your post. Here on the Treehouse forums we usually try to stick to giving hints and letting the user learn to solve their own issues.

This is why 2 people who posted before you didn't post the code for the answer.