-
Notifications
You must be signed in to change notification settings - Fork 0
/
dragtest.html
126 lines (118 loc) · 3.41 KB
/
dragtest.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>drag</title>
<link href="https://adminlte.io/themes/v3/dist/css/adminlte.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.5.0/css/bootstrap.min.css" rel="stylesheet"/>
<style>
body {
margin: 0;
}
.container {
background-color: #333;
padding: 1rem;
margin-top: 1rem;
}
.draggable {
padding: 1rem;
background-color: white;
border: 1px solid black;
cursor: move;
}
.draggable.dragging {
opacity: .5;
}
</style>
</head>
<body>
<div class="row main-div">
<div class="col-md-2 category-swap">
<div class="card">
<div class=" card-header">
<h5 class="card-title">Cat 1</h5>
</div>
<ul class="todo-list" data-widget="todo-list">
<li>Task 1</li>
<li>Task 2</li>
<li>Task 3</li>
<li>Task 4</li>
</ul>
</div>
</div>
<div class="col-md-2 category-swap">
<div class="card">
<div class=" card-header">
<h5 class="card-title">Cat 2</h5>
</div>
<ul class="todo-list" data-widget="todo-list">
<li>Task 1</li>
<li>Task 2</li>
<li>Task 3</li>
<li>Task 4</li>
</ul>
</div>
</div>
<div class="col-md-2 category-swap">
<div class="card">
<div class=" card-header">
<h5 class="card-title">Cat 3</h5>
</div>
<ul class="todo-list" data-widget="todo-list">
<li>Task 1</li>
<li>Task 2</li>
<li>Task 3</li>
<li>Task 4</li>
</ul>
</div>
</div>
<div class="col-md-2 category-swap">
<div class="card">
<div class=" card-header">
<h5 class="card-title">Cat 4</h5>
</div>
<ul class="todo-list" data-widget="todo-list">
<li>Task 1</li>
<li>Task 2</li>
<li>Task 3</li>
<li>Task 4</li>
</ul>
</div>
</div>
</div>
<div id="xxx">
<span style="background-color: red;">1</span>
<span style="background-color: orange;">2</span>
<span style="background-color: gold;">3</span>
<span style="background-color: green;">4</span>
<span style="background-color: blue;">5</span>
<span style="background-color: indigo;">6</span>
<span style="background-color: violet;">7</span>
<span style="background-color: brown;">8</span>
<span style="background-color: cyan;">9</span>
<span style="background-color: magenta;">10</span>
<span style="background-color: navy;">11</span>
<span style="background-color: maroon;">12</span>
<span style="background-color: purple;">13</span>
<span style="background-color: pink;">14</span>
<span style="background-color: lime;">15</span>
<span style="background-color: lightblue;">16</span>
<span style="background-color: black;">17</span>
<span style="background-color: gray;">18</span>
<span style="background-color: tan;">19</span>
<span style="background-color: yellowgreen;">20</span>
</div>
<div class="container">
<p class="draggable" draggable="true">1</p>
<p class="draggable" draggable="true">2</p>
</div>
<div class="container">
<p class="draggable" draggable="true">3</p>
<p class="draggable" draggable="true">4</p>
</div>
<script src="https://cdn.jsdelivr.net/npm/@shopify/draggable@1.0.0-beta.11/lib/draggable.bundle.js"></script>
<script src="./js/drag.js"></script>
</body>
</html>