-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathexample.html
More file actions
39 lines (38 loc) · 799 Bytes
/
example.html
File metadata and controls
39 lines (38 loc) · 799 Bytes
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
<html>
<head>
<title>Drop</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
body {
padding: 50px;
}
#drop {
width: 300px;
height: 300px;
border: 1px dotted #ddd;
}
#drop.over {
border: 3px dotted #ddd;
}
#drop.over div {
background: red;
}
</style>
</head>
<body>
<div id="drop">
<div>I'm a child node!</div>
</div>
<script src="build/build.js"></script>
<script>
var drop = require('drop');
var el = document.querySelector('#drop');
drop(el, function(e){
var items = e.items;
items.forEach(function(item){
console.log(item);
});
});
</script>
</body>
</html>