4 <meta charset=
"UTF-8" />
5 <title>jQuery UI Droppable - Default Demo
</title>
6 <link type=
"text/css" href=
"css/ui-lightness/jquery-ui-1.8.10.custom.css" rel=
"stylesheet" />
7 <script type=
"text/javascript" src=
"js/jquery-1.4.4.min.js"></script>
8 <script type=
"text/javascript" src=
"js/jquery-ui-1.8.10.custom.min.js"></script>
9 <style type=
"text/css">
10 #draggable { width: 100px; height: 100px; padding: 0.5em; float: left
; margin: 10px 10px 10px 0; }
11 #droppable { width: 150px; height: 150px; padding: 0.5em; float: left
; margin: 10px; }
13 <script type=
"text/javascript">
15 $("#draggable").draggable();
16 $("#droppable").droppable({
17 drop: function(event
, ui
) {
18 $(this).addClass('ui-state-highlight').find('p').html('Dropped!');
22 var report_event = function(report_text
) {
23 var reportElement
= $("#drop_reports");
24 var origText
= reportElement
.text();
25 reportElement
.text(origText
+ " " + report_text
);
28 $('body').mousedown(function() {
32 $('body').mousemove(function() {
36 $('body').mouseup(function() {
45 <div id=
"draggable" class=
"ui-widget-content">
46 <p>Drag me to my target
</p>
49 <div id=
"droppable" class=
"ui-widget-header">
53 <div class=
"test-data">
54 <p id=
"drop_reports">start
</p>
57 </div><!-- End demo -->
59 <div class=
"demo-description">
61 <p>Taken from the JQuery demo.
</p>
63 </div><!-- End demo-description -->