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 trialAlan Sea
6,781 PointsUnable to edit/delete List Items added by user...
I can manipulate pre-populated tasks all I want and add any task I want to the list, but none of my additions can be edited or deleted and the console doesn't show any issues. Thoughts?
1 Answer
Chad Duncan
10,498 PointsHey Alan,
I looked at your code and it seems you are forgetting to run the bindTaskEvents function when you add a new task.
//Add a new task
var addTask = function() {
console.log('Add task...');
//Create a new list item with the text from the #new-task:
var listItem = createNewTaskElement(taskInput.value);
//Append listItem to incompleteTaskHolder
incompleteTaskHolder.appendChild(listItem);
bindTaskEvents(listItem, taskComplete);
}