We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c4be4a commit 7de3e29Copy full SHA for 7de3e29
dom-manipulation/todo-jquery/index.html
@@ -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>
dom-manipulation/todo-jquery/script.js
@@ -0,0 +1,7 @@
+$('#addtask').click(function() {
+ $('#tasklist').append(
+ $('<li>').text($('#newtask').val())
+ )
+})
0 commit comments