-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
41 lines (38 loc) · 1.15 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
<html>
<head>
<title>jQuery.easydrag</title>
</head>
<body>
<h3>Drag the dialog.</h3>
<div style="width: 200px; height: 100px;">
<div id="dialog1" style="width: 100%; height: 100%; background: yellow;">
<div id="title1" style="height: 40%; background: blue;">
Title
</div>
Content
</div>
</div>
<hr>
<h3>Drag the blue title.</h3>
<div style="width: 200px; height: 100px;">
<div id="dialog2" style="width: 100%; height: 100%; background: yellow;">
<div id="title2" style="height: 40%; background: blue;">
Title
</div>
Content
</div>
</div>
</body>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script src="jquery.easydrag.js"></script>
<script>
$(document).ready(function() {
// Drag by dialog
$('#dialog1').easydrag();
// Drag by title
$('#title2').easydrag({
dialog: $('#dialog2')
});
});
</script>
</html>