Vanilla JS todo list to add, edit, complete, and delete tasks
You’ve been tasked with building a basic ToDo app using HTML, CSS, and JavaScript. The goal of this project is to create a functional todo list that allows users to add, remove, complete, and update tasks. This exercise focuses on enhancing your skills with DOM manipulation, event handling, and dynamic content generation in Vanilla JavaScript. MDN’s guide to DOM scripting covers the APIs you will need.
The application’s UI is already set up with HTML and CSS. Your main task is to implement the JavaScript functionality to bring the ToDo app to life. Here are the key features your app should support:
Example: Below is a visual and functional description of the app’s intended behavior.
<!-- Initial State -->
<div id="container">
<div class="wrapper">
<h1>ToDo App</h1>
<form action="#" class="addtodo-form">
<input class="input-todo" type="text" placeholder="Write your todo...">
<input type="submit" value="Add Todo">
</form>
<br/><br/>
<h2>Items to be done</h2>
<br/>----<br/>
<ul>
<div class="no-todos">No Todos Available Yet</div>
</ul>
</div>
</div>
<!-- After Adding a New Task 'Task 1' -->
<ul>
<li>
<div class="text">Task 1</div>
<input class="hidden" type="text" value="Task 1">
<div class="buttons">
<button class="update green">Update</button>
<button class="delete">X</button>
<button class="done">Complete</button>
</div>
</li>
<div class="no-todos hidden">No Todos Available Yet</div>
</ul>
This project is an excellent opportunity to practice and showcase your ability to work with core web technologies and implement basic but crucial functionalities that are common in many web applications.