Skip to content

Commit 0f61bbe

Browse files
committed
Merge remote-tracking branch 'origin/master' into nested
2 parents aa72548 + a6c7a9b commit 0f61bbe

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

examples/index.html

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<!-- <script type="text/javascript" src="../dist/index.umd.js"></script> -->
6+
<script type="text/javascript" src="https://unpkg.com/@github/task-lists-element@latest"></script>
7+
<title>task-lists-element demo</title>
8+
</head>
9+
<body>
10+
<task-lists sortable>
11+
<ul class="contains-task-list">
12+
<li class="task-list-item">
13+
<label>
14+
<input type="checkbox" class="task-list-item-checkbox">
15+
Hubot
16+
</label>
17+
</li>
18+
<li class="task-list-item">
19+
<label>
20+
<input type="checkbox" class="task-list-item-checkbox">
21+
Bender
22+
</label>
23+
</li>
24+
</ul>
25+
26+
<ul>
27+
<li>
28+
Nested
29+
30+
<ul class="contains-task-list">
31+
<li class="task-list-item">
32+
<label>
33+
<input type="checkbox" class="task-list-item-checkbox">
34+
WALL-E
35+
</label>
36+
</li>
37+
<li class="task-list-item">
38+
<label>
39+
<input type="checkbox" class="task-list-item-checkbox">
40+
BB-8
41+
</label>
42+
</li>
43+
</ul>
44+
</li>
45+
</ul>
46+
</task-lists>
47+
<pre class="events"></pre>
48+
<script type="text/javascript">
49+
const events = document.querySelector('.events')
50+
document.addEventListener('task-lists:check', function(event) {
51+
events.append(`task-lists:check - checked: ${event.detail.checked}, position: ${event.detail.position}\n`)
52+
})
53+
54+
document.addEventListener('task-lists:move', function(event) {
55+
events.append(`task-lists:move - from: ${event.detail.src}, to: ${event.detail.dst}\n`)
56+
})
57+
</script>
58+
</body>
59+
</html>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy