I’m trying to build a To-Do App with Javascript, right now I’m trying to figure out, how to strike through a todo item with a checkbox and undo that. I’ve already tried to achieve the same with a button and I got the text to be striken through when I clicked the button, but I couldn’t figure out how to undo it.
Here is a codepen link (I hope it works?).
Thanks for any kind of help!
I don’t know if I really understood what you meant. I now added onclick on the list and a function that changes the style of the text. But how do I undo the styling now?
Edit: I found another way to make it work, thanks for the help though!