Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions public/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ document.addEventListener('DOMContentLoaded', () => {
// Load tasks will be called here later (Issue #9)
});

//add task complete toggel
function toggleTask(id) {
tasks = tasks.map(task => {
if (task.id === id) {
return { ...task, completed: !task.completed };
}
return task;
});
renderTasks();
}
5 changes: 5 additions & 0 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ body {
display: flex;
flex-direction: column;
}
.task-item.completed span {
text-decoration: line-through;
color: #888;
}