4 <meta charset=
"UTF-8" />
5 <title>jQuery UI Sortable - Connect lists
</title>
6 <!--link type="text/css" href="development-bundle/themes/base/jquery.ui.all.css" rel="stylesheet" /-->
7 <!--link type="text/css" href="development-bundle/demos/demos.css" rel="stylesheet" /-->
8 <link type=
"text/css" href=
"css/ui-lightness/jquery-ui-1.8.10.custom.css" rel=
"stylesheet" />
9 <script type=
"text/javascript" src=
"js/jquery-1.4.4.min.js"></script>
10 <script type=
"text/javascript" src=
"js/jquery-ui-1.8.10.custom.min.js"></script>
11 <style type=
"text/css">
12 #sortable1, #sortable2
{ list-style-type: none
; margin: 0; padding: 0; float: left
; margin-right: 10px; }
13 #sortable1 li
, #sortable2 li
{ margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 120px; }
15 <script type=
"text/javascript">
17 $("#sortable1, #sortable2").sortable({
18 connectWith
: '.connectedSortable'
19 }).disableSelection();
21 var report_event = function(report_text
) {
22 var reportElement
= $("#dragging_reports");
23 var origText
= reportElement
.text();
24 reportElement
.text(origText
+ " " + report_text
);
27 $("#sortable2").droppable({
28 out: function(event
, ui
) {
29 report_event("DragOut");
33 $("#sortable1").droppable({
34 drop: function(event
, ui
) {
35 report_event("DropIn " + ui
.draggable
.text());
43 <ul id=
"sortable1" class=
"connectedSortable">
44 <li id=
"leftitem-1" class=
"ui-state-default">LeftItem
1</li>
45 <li id=
"leftitem-2" class=
"ui-state-default">LeftItem
2</li>
46 <li id=
"leftitem-3" class=
"ui-state-default">LeftItem
3</li>
47 <li id=
"leftitem-4" class=
"ui-state-default">LeftItem
4</li>
48 <li id=
"leftitem-5" class=
"ui-state-default">LeftItem
5</li>
51 <ul id=
"sortable2" class=
"connectedSortable">
52 <li id=
"rightitem-1" class=
"ui-state-highlight">RightItem
1</li>
53 <li id=
"rightitem-2" class=
"ui-state-highlight">RightItem
2</li>
54 <li id=
"rightitem-3" class=
"ui-state-highlight">RightItem
3</li>
55 <li id=
"rightitem-4" class=
"ui-state-highlight">RightItem
4</li>
56 <li id=
"rightitem-5" class=
"ui-state-highlight">RightItem
5</li>
62 <div class=
"test-data">
63 <p id=
"dragging_reports">Nothing happened.
</p>