source: main/trunk/greenstone3/web/interfaces/oran/js/jquery-ui-1.8rc1/demos/sortable/delay-start.html@ 24245

Last change on this file since 24245 was 24245, checked in by sjb48, 13 years ago

Oran code for supporting format changes to document.

  • Property svn:executable set to *
File size: 2.0 KB
Line 
1<!doctype html>
2<html lang="en">
3<head>
4 <title>jQuery UI Sortable - Delay start</title>
5 <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" />
6 <script type="text/javascript" src="../../jquery-1.4.1.js"></script>
7 <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
8 <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
9 <script type="text/javascript" src="../../ui/jquery.ui.mouse.js"></script>
10 <script type="text/javascript" src="../../ui/jquery.ui.sortable.js"></script>
11 <link type="text/css" href="../demos.css" rel="stylesheet" />
12 <style type="text/css">
13 #sortable1, #sortable2 { list-style-type: none; margin: 0; padding: 0; margin-bottom: 15px;zoom: 1; }
14 #sortable1 li, #sortable2 li { margin: 0 5px 5px 5px; padding: 5px; font-size: 1.2em; width: 95%; }
15 </style>
16 <script type="text/javascript">
17 $(function() {
18 $("#sortable1").sortable({
19 delay: 300
20 });
21
22 $("#sortable2").sortable({
23 distance: 15
24 });
25
26 $("li").disableSelection();
27 });
28 </script>
29</head>
30<body>
31<div class="demo">
32
33<h3 class="docs">Time delay of 300ms:</h3>
34
35<ul id="sortable1">
36 <li class="ui-state-default">Item 1</li>
37 <li class="ui-state-default">Item 2</li>
38 <li class="ui-state-default">Item 3</li>
39 <li class="ui-state-default">Item 4</li>
40</ul>
41
42<h3 class="docs">Distance delay of 15px:</h3>
43
44<ul id="sortable2">
45 <li class="ui-state-default">Item 1</li>
46 <li class="ui-state-default">Item 2</li>
47 <li class="ui-state-default">Item 3</li>
48 <li class="ui-state-default">Item 4</li>
49</ul>
50
51</div><!-- End demo -->
52
53<div class="demo-description">
54
55<p>
56 Prevent accidental sorting either by delay (time) or distance. Set a number of
57 milliseconds the element needs to be dragged before sorting starts
58 with the <code>delay</code> option. Set a distance in pixels the element
59 needs to be dragged before sorting starts with the <code>distance</code>
60 option.
61</p>
62
63</div><!-- End demo-description -->
64
65</body>
66</html>
Note: See TracBrowser for help on using the repository browser.