Skip to content

Commit d598894

Browse files
created a new brach and renamed the index html file to Alarmclockapp
1 parent 10b3ac9 commit d598894

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

Sprint-3/todo-list/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ <h1>My ToDo List</h1>
3434
</div>
3535
</li>
3636
</template>
37+
<br>
38+
<br>
39+
<div id="completed-tasks">
40+
<h2>Completed Tasks</h2>
41+
<ul id="completed-list"> </ul>
42+
<button id = "delete-completed-btn">Delete Completed Tasks</button>
43+
</div
44+
>
3745

3846
</div>
3947
</body>

Sprint-3/todo-list/script.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,11 @@ function createListItem(todo, index) {
7373
});
7474

7575
return li;
76-
}
76+
}
77+
78+
const completedList= document.querySelector("#completed-list");
79+
const deleteCompletedTasks= document.querySelector("#delete-completed-btn");
80+
deleteCompletedTasks.addEventListener("click", ()=> {
81+
todos.deleteCompletedTasks();
82+
render();
83+
});

0 commit comments

Comments
 (0)