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 / visual-feedback.html

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

74 lines 2.6 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 - Visual feedback</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, #draggable3, #set div { width: 90px; height: 90px; padding: 0.5em; float: left; margin: 0 10px 10px 0; }
12 #draggable, #draggable2, #draggable3 { margin-bottom:20px; }
13 #set { clear:both; float:left; width: 368px; height: 120px; }
14 p { clear:both; margin:0; padding:1em 0; }
15 </style>
16 <script type="text/javascript">
17 $(function() {
18 $("#draggable").draggable({ helper: 'original' });
19 $("#draggable2").draggable({ opacity: 0.7, helper: 'clone' });
20 $("#draggable3").draggable({
21 cursor: 'move',
22 cursorAt: { top: -12, left: -20 },
23 helper: function(event) {
24 return $('<div class="ui-widget-header">I\'m a custom helper</div>');
25 }
26 });
27 $("#set div").draggable({ stack: { group: '#set div', min: 1 } });
28 });
29 </script>
30 </head>
31 <body>
32 <div class="demo">
33
34 <h3 class="docs">With helpers:</h3>
35
36 <div id="draggable" class="ui-widget-content">
37 <p>Original</p>
38 </div>
39
40 <div id="draggable2" class="ui-widget-content">
41 <p>Semi-transparent clone</p>
42 </div>
43
44 <div id="draggable3" class="ui-widget-content">
45 <p>Custom helper (in combination with cursorAt)</p>
46 </div>
47
48 <h3 class="docs">Stacked:</h3>
49 <div id="set">
50 <div class="ui-widget-content">
51 <p>We are draggables..</p>
52 </div>
53
54 <div class="ui-widget-content">
55 <p>..whose z-indexes are controlled automatically..</p>
56 </div>
57
58 <div class="ui-widget-content">
59 <p>..with the stack option.</p>
60 </div>
61 </div>
62
63 </div><!-- End demo -->
64
65 <div class="demo-description">
66
67 <p>Provide feedback to users as they drag an object in the form of a helper. The <code>helper</code> option accepts the values 'original' (the draggable object moves with the cursor), 'clone' (a duplicate of the draggable moves with the cursor), or a function that returns a DOM element (that element is shown near the cursor during drag). Control the helper's transparency with the <code>opacity</code> option.</p>
68
69 <p>To clarify which draggable is in play, bring the draggable in motion to front. Use the <code>zIndex</code> option to set a higher z-index for the helper, if in play, or use the <code>stack</code> option to ensure that the last item dragged will appear on top of others in the same group on drag stop.</p>
70
71 </div><!-- End demo-description -->
72 </body>
73 </html>
74