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!
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
Need a little help
On line 14 of the app.js, we want to get the anchor (the a element) from inside the listItem. Use a method to traverse and select the anchor.
Patrick Koch34,236 Points
Hello Quintin, The querySelector() will help ;-)
Exp. for your app.js if you write
var incompleteTasksHolder = document.getElementById("incomplete-tasks"); //incomplete-tasks var selecta = incompleteTasksHolder.querySelector("label"); console.log(selecta);
the console shows you the select element, if you have more elements that fit to the enterd selectors, its just shows you the first, its pretty cool you can enter "a" for anchor or a class name like " .editMode". I personally really like the querySelector.
var anchor = listItem.querySelector("a");