annotate jquery-ui/development-bundle/demos/sortable/placeholder.html @ 0:b2e4605f20b2

beta version
author dwinter
date Thu, 30 Jun 2011 09:07:49 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1 <!DOCTYPE html>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
2 <html lang="en">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
3 <head>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
4 <meta charset="utf-8">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
5 <title>jQuery UI Sortable - Drop placeholder</title>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
6 <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
7 <script src="../../jquery-1.5.1.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
8 <script src="../../ui/jquery.ui.core.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
9 <script src="../../ui/jquery.ui.widget.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
10 <script src="../../ui/jquery.ui.mouse.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
11 <script src="../../ui/jquery.ui.sortable.js"></script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
12 <link rel="stylesheet" href="../demos.css">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
13 <style>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
14 #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
15 #sortable li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; height: 1.5em; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
16 html>body #sortable li { height: 1.5em; line-height: 1.2em; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
17 .ui-state-highlight { height: 1.5em; line-height: 1.2em; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
18 </style>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
19 <script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
20 $(function() {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
21 $( "#sortable" ).sortable({
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
22 placeholder: "ui-state-highlight"
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
23 });
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
24 $( "#sortable" ).disableSelection();
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
25 });
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
26 </script>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
27 </head>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
28 <body>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
29 <div class="demo">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
30
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
31 <ul id="sortable">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
32 <li class="ui-state-default">Item 1</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
33 <li class="ui-state-default">Item 2</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
34 <li class="ui-state-default">Item 3</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
35 <li class="ui-state-default">Item 4</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
36 <li class="ui-state-default">Item 5</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
37 <li class="ui-state-default">Item 6</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
38 <li class="ui-state-default">Item 7</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
39 </ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
40
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
41 </div><!-- End demo -->
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
42
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
43
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
44
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
45 <div class="demo-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
46 <p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
47 When dragging a sortable item to a new location, other items will make room
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
48 for the that item by shifting to allow white space between them. Pass a
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
49 class into the <code>placeholder</code> option to style that space to
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
50 be visible. Use the boolean <code>forcePlaceholderSize</code> option
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
51 to set dimensions on the placeholder.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
52 </p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
53 </div><!-- End demo-description -->
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
54
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
55 </body>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
56 </html>