/
simple-todo.html
92 lines (76 loc) · 2.09 KB
/
simple-todo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!doctype html>
<head>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="src/ramd.js" language="javascript" type="text/javascript"></script>
<title>To Do List</title>
<style>
body {
font: 26px/1.5 Helvetica, sans-serif;
background-color: #EDEBDE;
word-wrap: break-word;
}
h1 {
font: 16px/1.5 Helvetica, sans-serif;
color: #72a606;
margin-top: 20px;
}
li {
list-style-type: circle;
line-height: 1.5;
cursor: pointer;
}
.a {
text-decoration: overline
}
.main {
margin: 0 auto;
width: 480px;
}
#tx {
float: left;
width: 320px;
height: 85px;
white-space: pre-wrap;
word-wrap: break-word;
font: 21px/1.3"Helvetica Neue", sans-serif;
background-color: rgba(255, 255, 255, 0.5);
}
#bt {
float: left;
display: block;
font-size: 48px;
margin-left: 20px;
padding: 10px;
cursor: pointer;
margin-bottom: 15px;
border-radius: 8px;
color: #fff;
background-color: #72a606;
}
.clear {
clear: both;
}
</style>
<script type="text/javascript">
function loadme() {
var el1 = {}
on($("#bt"), 'click', function(e) {
add(el1, $("#todo")[0], "li", $("#tx")[0].value);
on($("li"), 'dblclick', function(e) {
del(el1, this);
});
});
}
</script>
</head>
<body onload="loadme()">
<div class="main">
<h1>To Do List</h1>
<textarea placeholder="Insert Text ... and double click to delete" id="tx"></textarea> <span id="bt">Go</span>
<div class="clear"></div>
<ul id="todo">
</ul>
</div>
</body>
</html>