1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
3 | <head> |
---|
4 | <title>Sortable connectWith fails</title> |
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
6 | |
---|
7 | <script type="text/javascript" src="http://code.jquery.com/jquery-1.3.1.js"></script> |
---|
8 | <script type="text/javascript" src="http://view.jquery.com/trunk/ui/ui/ui.core.js"></script> |
---|
9 | <script type="text/javascript" src="http://view.jquery.com/trunk/ui/ui/ui.sortable.js"></script> |
---|
10 | |
---|
11 | <style type="text/css"> |
---|
12 | div { border:1px solid black; margin: 5px 5px 20px 5px; } |
---|
13 | </style> |
---|
14 | </head> |
---|
15 | |
---|
16 | <body> |
---|
17 | #sortable1 |
---|
18 | <div id="sortable1"> |
---|
19 | <div>sortable item 1</div> |
---|
20 | <div>sortable item 2</div> |
---|
21 | </div> |
---|
22 | |
---|
23 | |
---|
24 | #sortable2 (connectWith: "#sortable1") <!-- produces error in Firefox 3.x --> |
---|
25 | <div id="sortable2"> |
---|
26 | <div>sortable item 1</div> |
---|
27 | <div>sortable item 2</div> |
---|
28 | </div> |
---|
29 | |
---|
30 | |
---|
31 | #sortable3 (connectWith: ["#sortable1"]) |
---|
32 | <div id="sortable3"> |
---|
33 | <div>sortable item 1</div> |
---|
34 | <div>sortable item 2</div> |
---|
35 | </div> |
---|
36 | |
---|
37 | |
---|
38 | <script type="text/javascript"> |
---|
39 | |
---|
40 | $(function () { |
---|
41 | |
---|
42 | $("#sortable1").sortable(); |
---|
43 | |
---|
44 | $("#sortable2").sortable({ |
---|
45 | connectWith: "#sortable1" |
---|
46 | }); |
---|
47 | |
---|
48 | $("#sortable3").sortable({ |
---|
49 | connectWith: ["#sortable1"] |
---|
50 | }); |
---|
51 | |
---|
52 | }); |
---|
53 | |
---|
54 | </script> |
---|
55 | |
---|
56 | |
---|
57 | </body> |
---|
58 | </html> |
---|