-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
60 lines (55 loc) · 1.24 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Dragify Examples</title>
<link rel="stylesheet" type="text/css" href="dist/dragify.css">
<style type="text/css">
.parent-one,
.parent-two {
float: left;
margin-top: 30px;
margin-left: 30px;
width: 150px;
padding: 10px;
box-shadow: 0 0 2px #000;
}
.child {
width: 100%;
height: 20px;
margin-bottom: 10px;
line-height: 20px;
text-align: center;
box-shadow: 0 0 2px #000;
border-radius: 3px;
cursor: pointer;
background-color: rgba(0,0,0,0.1);
}
.child:last-child {
margin-bottom: 0;
}
</style>
</head>
<body>
<div class="parent-one">
<div class="child">one-1</div>
<div class="child">one-2</div>
<div class="child">one-3/div>
<div class="child">one-4</div>
</div>
<div class="parent-two">
<div class="child">two-1</div>
<div class="child">two-2</div>
<div class="child">two-3</div>
<div class="child">two-4</div>
</div>
<script src="../mini-event-emitter/dist/MiniEventEmitter.min.js"></script>
<script src="dist/dragify.min.js"></script>
<script>
containers = [
document.getElementsByClassName("parent-one")[0],
document.getElementsByClassName("parent-two")[0]
]
var dragify = new Dragify(containers);
</script>
</body>
</html>