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

akc
akc
11,729 Points

jQuery Attributes

Challenge task 3 of 4 - In jQuery add the attribute of 'checked' with the value of 'checked' to the input with the id of 'accept'. I have added "$("#accept input").attr("checked","checked");" but I have received the error message "Bummer! You need to call the 'attr' method." May I ask for any hint?

2 Answers

Ron McCranie
Ron McCranie
7,837 Points

$("input#accept").attr("checked","checked");

akc
akc
11,729 Points

Thanks Ron! Silly selector mistake.