-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibrary.html
51 lines (37 loc) · 1017 Bytes
/
library.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
<!DOCTYPE HTML>
<html>
<head>
<style>
#div1 {
width: 350px;
height: 70px;
padding: 10px;
border: 1px solid #aaaaaa;
}
</style>
<script>
function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData("text", ev.target.id);
}
function drop(ev) {drag1
ev.preventDefault();
var data = ev.dataTransfer.getData("text");
ev.target.appendChild(document.getElementById(data));
}
</script>
</head>
<body>
<a href="index.html">Home</a>
<p>well the (virtual) library is still under construction, go help me put some books on the shelves, thank you.</p>
<div id="div1" ondrop="drop(event)" ondragover="allowDrop(event)" ></div>
<div id="div1" ondrop="drop(event)" ondragover="allowDrop(event)" >
</div>
<br>
<h1 id="drag1" draggable="true" ondragstart="drag(event)" >📚 </h1>
<h1 id="drag2" draggable="true" ondragstart="drag(event)" >📕 </h1>
<p>one day theres gonna be an actual real-life library with actual real-life books just you wait</p>
</body>
</html>