i used eventListener for add textDecoration, so how can i remove textDecoration with eventListener? it's To-Do list, and i need remove Done task to not-done.
I just wrote this for make the task done:
pTag.addEventListener("click", taskDone);
function taskDone(){
taskTag.style.textDecoration = "line-through";
}
and wrote this for remove "textDecoration", but doesn't work and didn't remove textDecoration:
document.removeEventListener("click", remDone);
function remDone(){
taskTag.style.textDecoration = "none";
}
so please tell me what should I do and what is the solution?