MarcelHarabagiu / Todo-list

create elements in a todo list
0 stars 0 forks source link

dont add click to entire todo #2

Open HelloMihai opened 3 years ago

HelloMihai commented 3 years ago

you should add a click listener to each button - each completed button, each trash button where the buttons are created.

created here: https://github.com/MarcelHarabagiu/Todo-list/blob/master/app.js#L149

and here: https://github.com/MarcelHarabagiu/Todo-list/blob/master/app.js#L154

refer to previous calc project

do not add a click to the entire list then have to figure out which button was clicked in the callback method: https://github.com/MarcelHarabagiu/Todo-list/blob/master/app.js#L172

MarcelHarabagiu commented 3 years ago

click listener to each button was created outside Todo function

https://github.com/MarcelHarabagiu/Todo-list/blob/cc063c19ab49e48dfad96ed5cd406b60a5c58bba/app.js#L178-L210