We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 94172e9 commit f4d9be5Copy full SHA for f4d9be5
1 file changed
Todo/app.js
@@ -68,8 +68,25 @@ function append(id, todo) {
68
</li>
69
`
70
main.appendChild(ul)
71
- console.log(todoList);
72
-
73
}
74
+
+ul.addEventListener('click', (e) => {
75
+ let inp = todoList.childNodes[1].children[0].id;
76
+ let getInput = document.querySelector('.inp')
77
+ let btn = e.target.classList.contains("btn-edit")
78
+ if (btn) {
79
+ if(e.target.id === inp){
80
+ if(add){
81
+ remove
82
+ getInput.focus()
83
+ }
84
+ if(remove){
85
+ add
86
87
88
89
90
+})
91
92
window.addEventListener("DOMContentLoaded", fetching)
0 commit comments