Debian Codegraph @

demos/sortable/placeholder.html

raw
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>jQuery UI Sortable - Drop placeholder</title>
7 <link rel="stylesheet" href="../../themes/base/all.css">
8 <link rel="stylesheet" href="../demos.css">
9 <style>
10 #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
11 #sortable li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; height: 1.5em; }
12 html>body #sortable li { height: 1.5em; line-height: 1.2em; }
13 .ui-state-highlight { height: 1.5em; line-height: 1.2em; }
14 </style>
15 <script src="../../external/requirejs/require.js"></script>
16 <script src="../bootstrap.js" data-modules="disable-selection">
17 $( "#sortable" ).sortable({
18 placeholder: "ui-state-highlight"
19 });
20 $( "#sortable" ).disableSelection();
21 </script>
22 </head>
23 <body>
24
25 <ul id="sortable">
26 <li class="ui-state-default">Item 1</li>
27 <li class="ui-state-default">Item 2</li>
28 <li class="ui-state-default">Item 3</li>
29 <li class="ui-state-default">Item 4</li>
30 <li class="ui-state-default">Item 5</li>
31 <li class="ui-state-default">Item 6</li>
32 <li class="ui-state-default">Item 7</li>
33 </ul>
34
35 <div class="demo-description">
36 <p>
37 When dragging a sortable item to a new location, other items will make room
38 for the that item by shifting to allow white space between them. Pass a
39 class into the <code>placeholder</code> option to style that space to
40 be visible. Use the boolean <code>forcePlaceholderSize</code> option
41 to set dimensions on the placeholder.
42 </p>
43 </div>
44 </body>
45 </html>