source: main/trunk/greenstone3/web/interfaces/oran/js/jquery-ui-1.8rc1/demos/draggable/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: 1.6 KB
Line 
1<!doctype html>
2<html lang="en">
3<head>
4 <title>jQuery UI Draggable - 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.draggable.js"></script>
11 <link type="text/css" href="../demos.css" rel="stylesheet" />
12 <style type="text/css">
13 #draggable, #draggable2 { width: 120px; height: 120px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
14 </style>
15 <script type="text/javascript">
16 $(function() {
17 $("#draggable").draggable({ distance: 20 });
18 $("#draggable2").draggable({ delay: 1000 });
19 $(".ui-draggable").disableSelection();
20 });
21 </script>
22</head>
23<body>
24<div class="demo">
25
26<div id="draggable" class="ui-widget-content">
27 <p>Only if you drag me by 20 pixels, the dragging will start</p>
28</div>
29
30<div id="draggable2" class="ui-widget-content">
31 <p>Regardless of the distance, you have to drag and wait for 1000ms before dragging starts</p>
32</div>
33
34</div><!-- End demo -->
35
36<div class="demo-description">
37
38<p>
39Delay the start of dragging for a number of milliseconds with the <code>delay</code> option; prevent dragging until the cursor is held down and dragged a specifed number of pixels with the <code>distance</code> option.
40</p>
41
42</div><!-- End demo-description -->
43</body>
44</html>
Note: See TracBrowser for help on using the repository browser.