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

removing items from a check box list

Hi guys, im trying to remove the checked only list items when you press the - (remove button) , but it is not working. also i cant get the check items to appear when you add a new list item. it only has a checked box on the first list item. any ideas?

http://codepen.io/mbrwn/pen/QbePRd

2 Answers

In your remove function, you made a typeo.

You have

You want  
```$("input:checked")```


Changing this and volia!  Your checkboxes are removed.  Obviously not the intended function, you'll need to do some DOM traversals to get it working correctly.  I'll leave that up to you.

got it $("input:checked").parent().remove(); thanks