here is all my code js first one
second one
the essue is here this one it only works when i do refreash to the page
and if you need all files of the project here is the link i drop it in my github
https://github.com/Abde-l-latif/to-do-list
i asked chatGpt he has give me the essue :
The issue with your code is that you’re using tasks.addEventListener(‘click’) which only attaches an event listener to the existing elements in the tasks container. When you dynamically add new tasks using addElements, the click event listener doesn’t automatically attach to those newly created elements.
i try but i didn’t found any solution to this
ab robot is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.