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

General Discussion

Build an Interactive Website > Form Validation and Manipulation > Modifying Attributes

Build an Interactive Website
Form Validation and Manipulation
Modifying Attributes

Task one, passed okay $(email).addClass("valid");

In jQuery remove the class of 'error' from the input with the id of 'name' Why not then Task Two? $(name).removeClass("error");

4 Answers

Task one shouldn't have passed as the query for the input with id of 'email' would be this:

$('#email').addClass('valid');

Likewise, you'd need to include the hash tag for the input with id of 'name' for the second task.

Hi Ian, I remain blocked on the task one ! I have watched 3 times the video and I am still blocked ! I entered the code above but it didn't work. How can I get help ? It is probably a silly mistake somewhere !

Did you get this figured out ?

Ian, I want to thank you for your help recently. I have realized that I need a little more knowledge than the little videos give. So, I'm going to pivot into some other classes for a while. Word Press looks interesting and I bought the Ethan Marcotte book and the Luke Wroblewski book. So, I hope to go a little deeper and wider.

Then confident, I'll circle back and attack them GD strings.

TTYL

Mike

Ian is right. "Likewise, you'd need to include the hash tag for the input with id of 'name' for the second task."

You forgot one little thing. The # should be there to represent a ID.

The correct code is

$("#name").removeClass("error");