-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
101 lines (81 loc) · 2.09 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
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
<!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>Drog.js</title>
<script src="Drog.min.js"></script>
<style>
.win-dos {
display: block;
width: 200px;
height: 200px;
background-color: #f1f1f1;;
text-align: center;
border: 1px solid black;
border-radius: 5px;
}
[data-drog] {
cursor: move;
background-color: #2196F3;
height: 35px;
text-align: center;
}
.btn {
padding: 1.25rem;
border: 0;
border-radius: 3px;
background-color: #4F46E5;
color: #fff;
cursor: pointer;
}
</style>
</head>
<body style="height: 200vh;">
<h1>Drog.js</h1>
<form name="drag-head" class="win-dos">
<div data-drog>
<span>Click here to move</span>
</div>
<p>Move</p>
<p>this</p>
<p>ELEMENT</p>
</form>
<br><br>
<form name="drag-head2" class="win-dos">
<div data-drog>
<span>Click here to move</span>
</div>
<p>Move</p>
<p>this</p>
<p>ELEMENT</p>
</form>
<br><br>
<form name="drag-body" class="win-dos">
<p>Click to</p>
<p>Move</p>
<p>this</p>
<p>ELEMENT</p>
<input type="text">
</form>
<br><br>
<button onclick="on()" class="btn">
Enable Drog On The Third Box
</button>
<button onclick="off()" class="btn">
Disable Drog On The Third Box
</button>
<script>
Drog.on(document.forms["drag-head"]);
Drog.on(document.forms["drag-head2"]);
//Drog.on(document.forms["drag-body"]);
function on(){
Drog.on(document.forms["drag-body"]);
}
function off(){
Drog.off(document.forms["drag-body"]);
}
</script>
</body>
</html>