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
Miguel Rivera
21,679 PointsHide the label and checkbox from li when Filter checkbox is checked
Im trying to hide or remove the label and checkbox from the li when the filter checkbox is checked but when I unchecked the checkbox again the label and checkbox doesn't appear again.
Miguel Rivera
21,679 Points```ul.addEventListener('change', (e)=> { // Evento en los checkbox const checkbox = event.target; const checked = checkbox.checked; const listItem = checkbox.parentNode.parentNode;
if (checked) {
listItem.className = 'responded';
checkbox.parentNode.textContent = 'Confirmed';
} else {
listItem.className = '';
}
});
Steven Parker
243,656 PointsSteven Parker
243,656 PointsTo facilitate an analysis of your issue, show your code (properly formatted with Markdown) or make a snapshot of your workspace and post the link to it here.
Also please provide a link to the course page you are working with.