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 / handle.html

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

46 lines 1.7 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 - Handles</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: 100px; height: 100px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
12 #draggable p { cursor: move; }
13 </style>
14 <script type="text/javascript">
15 $(function() {
16 $("#draggable").draggable({ handle: 'p' });
17 $("#draggable2").draggable({ cancel: "p.ui-widget-header" });
18 $("div, p").disableSelection();
19 });
20 </script>
21 </head>
22 <body>
23 <div class="demo">
24
25 <div id="draggable" class="ui-widget-content">
26 <p class="ui-widget-header">I can be dragged only by this handle</p>
27 </div>
28
29 <div id="draggable2" class="ui-widget-content">
30 <p>You can drag me around&hellip;</p>
31 <p class="ui-widget-header">&hellip;but you can't drag me by this handle.</p>
32 </div>
33
34 <!-- ADD CANCEL DEMO -->
35
36 </div><!-- End demo -->
37
38 <div class="demo-description">
39
40 <p>Allow dragging only when the cursor is over a specific part of the draggable. Use the <code>handle</code> option to specify the jQuery selector of an element (or group of elements) used to drag the object.</p>
41 <p>Or prevent dragging when the cursor is over a specific element (or group of elements) within the draggable. Use the <code>cancel</code> option to specify a jQuery selector over which to "cancel" draggable functionality.</p>
42
43 </div><!-- End demo-description -->
44 </body>
45 </html>
46