Project Challenge 4: Moving a Task from To-do to Done
Move a task from the to-do list to done when the done button corresponding to that task element is clicked.
We'll cover the following
Problem statement
In this challenge, the task is this:
-
When the user clicks on one of the done
button
elements nested within a task, move the corresponding parent task element from the āTo-doā list to the end of the āDoneā list. -
Additionally, remove the done button element from the corresponding task element.
š Note: The done button element with an id of
done
is dynamically generated upon the addition of a new task. The click event handler$("#done").click()
will not work so we will utilize theon()
method.
Sample input
Click on the done button element corresponding to the āComplete assignmentā task.
Sample output
The āComplete assignmentā task is moved from the āTo-doā to āDoneā, and the done button element is removed.
Coding exercise
The problem is designed for your practice, so you are encouraged to solve it on your own. If you are completely stuck, refer to the solution review in the next lesson for guidance.