PluginProbe
RSVP and Event Management / 1.3.0
RSVP and Event Management v1.3.0
trunk 0.5.0 0.6.0 0.7.0 0.8.0 0.9.0 0.9.5 1.0.0 1.1.0 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.5.0 1.6.0 1.6.1 1.6.2 1.6.5 1.7.0 1.7.2 1.7.3 1.7.4 1.7.5 1.7.6 All 136 releases
rsvp / jquery-ui-1.7.2.custom / development-bundle / demos / draggable / delay-start.html

delay-start.html in RSVP and Event Management 1.3.0, at jquery-ui-1.7.2.custom/development-bundle/demos/draggable/delay-start.html

43 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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.3.2.js"></script>
7 <script type="text/javascript" src="../../ui/ui.core.js"></script>
8 <script type="text/javascript" src="../../ui/ui.draggable.js"></script>
9 <link type="text/css" href="../demos.css" rel="stylesheet" />
10 <style type="text/css">
11 #draggable, #draggable2 { width: 120px; height: 120px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
12 </style>
13 <script type="text/javascript">
14 $(function() {
15 $("#draggable").draggable({ distance: 20 });
16 $("#draggable2").draggable({ delay: 1000 });
17 $(".ui-draggable").disableSelection();
18 });
19 </script>
20 </head>
21 <body>
22 <div class="demo">
23
24 <div id="draggable" class="ui-widget-content">
25 <p>Only if you drag me by 20 pixels, the dragging will start</p>
26 </div>
27
28 <div id="draggable2" class="ui-widget-content">
29 <p>Regardless of the distance, you have to drag and wait for 1000ms before dragging starts</p>
30 </div>
31
32 </div><!-- End demo -->
33
34 <div class="demo-description">
35
36 <p>
37 Delay 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.
38 </p>
39
40 </div><!-- End demo-description -->
41 </body>
42 </html>
43