0 added
0 removed
Original
2026-01-01
Modified
2026-03-09
1
<p>The task is added! But so far we cannot remove it. And the message does not disappear, even though the message is no longer current once we add another task to the list. Let’s fix this problem.</p>
1
<p>The task is added! But so far we cannot remove it. And the message does not disappear, even though the message is no longer current once we add another task to the list. Let’s fix this problem.</p>
2
<p>We need to tie a handler to the checkbox so that the task can be removed. We need to delete the task from the list when changing the checkbox status… Doesn’t it remind you of anything? We already wrote this code. You can find it in the addCheckHandler function. We passed those list elements that were already on the page to this function. Now we have a new element that did not exist before, and we also need to pass it to this function in order to add a handler.</p>
2
<p>We need to tie a handler to the checkbox so that the task can be removed. We need to delete the task from the list when changing the checkbox status… Doesn’t it remind you of anything? We already wrote this code. You can find it in the addCheckHandler function. We passed those list elements that were already on the page to this function. Now we have a new element that did not exist before, and we also need to pass it to this function in order to add a handler.</p>
3
<p>We will pass the task to the addCheckHandler function before we add this element to the page. In that case, an element with the handler and all of the desired functionality will appear in the list. It is as if we first configure the element, and only then do we add it to the page.</p>
3
<p>We will pass the task to the addCheckHandler function before we add this element to the page. In that case, an element with the handler and all of the desired functionality will appear in the list. It is as if we first configure the element, and only then do we add it to the page.</p>
4
<p>First, add the handler and make sure that the new task is deleted. And only then figure out how to make the message disappear.</p>
4
<p>First, add the handler and make sure that the new task is deleted. And only then figure out how to make the message disappear.</p>