-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
58 lines (50 loc) · 1.07 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<title>DRAGON DROP</title>
<style type="text/css">
#thing {
width:400px;
height:300px;
background-color:#0aa;
}
#other-thing, #other-thing1 {
background-color:#aa0;
}
#other-thing {
position:absolute;
top:100px;
left:1000px;
width:400px;
height:300px;
}
#other-thing1 {
position:absolute;
top:400px;
left:500px;
width:200px;
height:300px;
}
</style>
</head>
<body>
<p>A browser that implements HTML5 drag and drop (webkit??) is required, dawg.</p>
<div id="thing" draggable="true">
Hello I am draggable
</div>
<div id="other-thing">
I guess you can put him here
</div>
<div id="other-thing1">
oh no don't burn me
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(function() {
$('#thing').on('dragstart', function() { console.log('starting'); });
$('#other-thing, #other-thing1').on('dragend', function() { console.log('ending'); })
.on('dragover', function() { console.log('dragging'); });
});
</script>
</body>
</html>