Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript DOM Scripting By Example Editing and Filtering Names Filter Invitees Who Have Not Responded

My checkbox hides all invitees, instead of only those who haven't responded yet


Here is a link to my code. Not sure what I'm doing wrong here.

Thanks for the help!

2 Answers

Cameron Childres
Cameron Childres
11,769 Points

Hi Arielle,

Here's where the issue is:

// Line 20:
if(li.className === 'responded') 

// Line 70:
listItem.className = 'Responded';

It's a case of mismatched capitalization. When the 'confirmed' box is checked it adds the class 'Responded' but your filter checkbox looks for the class 'responded'. If you change line 70 to 'responded' so they match exactly then your code should behave as expected.

I hope this helps! Let me know if you have any questions.

Oh that's simple. Thank you!!