diff options
author | Maggie Costello Wachs <fg.maggie@gmail.com> | 2009-01-15 21:57:33 +0000 |
---|---|---|
committer | Maggie Costello Wachs <fg.maggie@gmail.com> | 2009-01-15 21:57:33 +0000 |
commit | c1447173c659c78e036b5c4c6bc91de26e84a13b (patch) | |
tree | 9570bf673044c0934b108d5ff94fef43ea15f924 /demos/draggable/delay-start.html | |
parent | 3530c1f3f8fe11e16451ef1cb49ae9f63a1b3b59 (diff) | |
download | jquery-ui-c1447173c659c78e036b5c4c6bc91de26e84a13b.tar.gz jquery-ui-c1447173c659c78e036b5c4c6bc91de26e84a13b.zip |
completed reorganization of draggable demos
Diffstat (limited to 'demos/draggable/delay-start.html')
-rw-r--r-- | demos/draggable/delay-start.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/demos/draggable/delay-start.html b/demos/draggable/delay-start.html new file mode 100644 index 000000000..66d3e4893 --- /dev/null +++ b/demos/draggable/delay-start.html @@ -0,0 +1,41 @@ +<!doctype html> +<html lang="en"> +<head> + <title>jQuery UI Draggable - Delay start</title> + <link type="text/css" href="../../themes/base/ui.all.css" rel="stylesheet" /> + <script type="text/javascript" src="../../jquery-1.3.js"></script> + <script type="text/javascript" src="../../ui/ui.core.js"></script> + <script type="text/javascript" src="../../ui/ui.draggable.js"></script> + <link type="text/css" href="../demos.css" rel="stylesheet" /> + <style type="text/css"> + #draggable, #draggable2 { width: 120px; height: 120px; padding: 0.5em; float: left; margin: 5px; } + </style> + <script type="text/javascript"> + $(function() { + $("#draggable").draggable({ distance: 20 }); + $("#draggable2").draggable({ delay: 1000 }); + }); + </script> +</head> +<body> +<div class="demo"> + +<div id="draggable" class="ui-widget-content"> + <p>Only if you drag me by 20 pixels, the dragging will start</p> +</div> + +<div id="draggable2" class="ui-widget-content"> + <p>Regardless of the distance, you have to drag and wait for 1000ms before dragging starts</p> +</div> + +</div><!-- End demo --> + +<div class="demo-description"> + +<p> +Delay the start of dragging for a number of milliseconds with the <strong>delay</strong> option; prevent dragging until the cursor is held down and dragged a specifed number of pixels with the <strong>distance</strong> option. +</p> + +</div><!-- End demo-description --> +</body> +</html> |