Skip to content

Commit 7de3e29

Browse files
todolist with jquery
Signed-off-by: Arnav Gupta <arnav@codingblocks.com>
1 parent 6c4be4a commit 7de3e29

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>Document</title>
8+
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
9+
<script defer src="script.js"></script>
10+
</head>
11+
<body>
12+
<h1>Todo List</h1>
13+
<input type="text" id="newtask">
14+
<button id="addtask">Add</button>
15+
<ul id="tasklist"></ul>
16+
17+
18+
</body>
19+
</html>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
$('#addtask').click(function() {
3+
$('#tasklist').append(
4+
5+
$('<li>').text($('#newtask').val())
6+
)
7+
})

0 commit comments

Comments
 (0)