annotate jquery-ui/development-bundle/docs/draggable.html @ 0:b2e4605f20b2

beta version
author dwinter
date Thu, 30 Jun 2011 09:07:49 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
2 <ul class="UIAPIPlugin-toc">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
3 <li><a href="#overview">Overview</a></li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
4 <li><a href="#options">Options</a></li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
5 <li><a href="#events">Events</a></li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
6 <li><a href="#methods">Methods</a></li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
7 <li><a href="#theming">Theming</a></li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
8 </ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
9 <div class="UIAPIPlugin">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
10 <h1>jQuery UI Draggable</h1>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
11 <div id="overview">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
12 <h2 class="top-header">Overview</h2>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
13 <div id="overview-main">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
14 <p>The jQuery UI Draggable plugin makes selected elements draggable by mouse.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
15 <p>Draggable elements gets a class of <code>ui-draggable</code>. During drag the element also gets a class of <code>ui-draggable-dragging</code>. If you want not just drag, but drag-and-drop, see the jQuery UI Droppable plugin, which provides a drop target for draggables.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
16 <p>All callbacks (start, stop, drag) receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
17 <ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
18 <li><b>ui.helper</b> - the jQuery object representing the helper that's being dragged</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
19 <li><b>ui.position</b> - current position of the helper as { top, left } object, relative to the offset element</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
20 <li><b>ui.offset</b> - current absolute position of the helper as { top, left } object, relative to page</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
21 </ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
22 <p><br />
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
23 </p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
24 <p>To manipulate the position of a draggable during drag, you can either <a href="http://jsbin.com/etako/edit" class="external text" title="http://jsbin.com/etako/edit">use a wrapper as the draggable helper</a> and position the wrapped element with absolute positioning, or you can correct internal values like so: <code>$(this).data('draggable').offset.click.top -= x</code>.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
25 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
26 <div id="overview-dependencies">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
27 <h3>Dependencies</h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
28 <ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
29 <li>UI Core</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
30 <li>UI Widget</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
31 <li>UI Mouse</li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
32 </ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
33 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
34 <div id="overview-example">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
35 <h3>Example</h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
36 <div id="overview-example" class="example">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
37 <ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
38 <p><div id="demo" class="tabs-container" rel="170">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
39 Initialize a draggable with default options.<br />
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
40 </p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
41 <pre>$(&quot;#draggable&quot;).draggable();
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
42 </pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
43 <p></div><div id="source" class="tabs-container">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
44 </p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
45 <pre>&lt;!DOCTYPE html&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
46 &lt;html&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
47 &lt;head&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
48 &lt;link href=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
49 &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js&quot;&gt;&lt;/script&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
50 &lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
51 &lt;style type=&quot;text/css&quot;&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
52 #draggable { width: 100px; height: 70px; background: silver; }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
53 &lt;/style&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
54 &lt;script&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
55 $(document).ready(function() {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
56 $(&quot;#draggable&quot;).draggable();
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
57 });
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
58 &lt;/script&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
59 &lt;/head&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
60 &lt;body style="font-size:62.5%;"&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
61
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
62 &lt;div id=&quot;draggable&quot;&gt;Drag me&lt;/div&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
63
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
64 &lt;/body&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
65 &lt;/html&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
66 </pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
67 <p></div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
68 </p><p></div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
69 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
70 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
71 <div id="options">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
72 <h2 class="top-header">Options</h2>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
73 <ul class="options-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
74
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
75 <li class="option" id="option-disabled">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
76 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
77 <h3 class="option-name"><a href="#option-disabled">disabled</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
78 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
79 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
80 <dd class="option-type">Boolean</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
81
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
82 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
83 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
84
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
85 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
86 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
87 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
88 <p>Disables (true) or enables (false) the draggable. Can be set when initialising (first creating) the draggable.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
89 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
90 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
91 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
92 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
93
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
94 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
95 Initialize a draggable with the <code>disabled</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
96 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
97 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
98 <pre><code>$( ".selector" ).draggable({ disabled: true });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
99 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
100
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
101
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
102 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
103 Get or set the <code>disabled</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
104 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
105 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
106 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
107 var disabled = $( ".selector" ).draggable( "option", "disabled" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
108 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
109 $( ".selector" ).draggable( "option", "disabled", true );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
110 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
111
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
112 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
113 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
114 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
115
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
116
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
117 <li class="option" id="option-addClasses">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
118 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
119 <h3 class="option-name"><a href="#option-addClasses">addClasses</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
120 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
121 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
122 <dd class="option-type">Boolean</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
123
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
124 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
125 <dd class="option-default">true</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
126
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
127 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
128 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
129 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
130 <p>If set to false, will prevent the <code>ui-draggable</code> class from being added. This may be desired as a performance optimization when calling <code>.draggable()</code> init on many hundreds of elements.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
131 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
132 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
133 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
134 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
135
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
136 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
137 Initialize a draggable with the <code>addClasses</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
138 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
139 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
140 <pre><code>$( ".selector" ).draggable({ addClasses: false });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
141 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
142
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
143
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
144 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
145 Get or set the <code>addClasses</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
146 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
147 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
148 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
149 var addClasses = $( ".selector" ).draggable( "option", "addClasses" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
150 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
151 $( ".selector" ).draggable( "option", "addClasses", false );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
152 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
153
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
154 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
155 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
156 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
157
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
158
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
159 <li class="option" id="option-appendTo">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
160 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
161 <h3 class="option-name"><a href="#option-appendTo">appendTo</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
162 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
163 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
164 <dd class="option-type">Element, Selector</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
165
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
166 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
167 <dd class="option-default">'parent'</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
168
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
169 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
170 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
171 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
172 <p>The element passed to or selected by the <code>appendTo</code> option will be used as the draggable helper's container during dragging. By default, the helper is appended to the same container as the draggable.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
173 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
174 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
175 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
176 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
177
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
178 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
179 Initialize a draggable with the <code>appendTo</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
180 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
181 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
182 <pre><code>$( ".selector" ).draggable({ appendTo: 'body' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
183 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
184
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
185
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
186 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
187 Get or set the <code>appendTo</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
188 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
189 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
190 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
191 var appendTo = $( ".selector" ).draggable( "option", "appendTo" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
192 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
193 $( ".selector" ).draggable( "option", "appendTo", 'body' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
194 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
195
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
196 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
197 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
198 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
199
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
200
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
201 <li class="option" id="option-axis">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
202 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
203 <h3 class="option-name"><a href="#option-axis">axis</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
204 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
205 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
206 <dd class="option-type">String</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
207
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
208 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
209 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
210
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
211 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
212 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
213 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
214 <p>Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
215 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
216 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
217 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
218 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
219
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
220 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
221 Initialize a draggable with the <code>axis</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
222 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
223 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
224 <pre><code>$( ".selector" ).draggable({ axis: 'x' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
225 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
226
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
227
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
228 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
229 Get or set the <code>axis</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
230 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
231 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
232 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
233 var axis = $( ".selector" ).draggable( "option", "axis" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
234 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
235 $( ".selector" ).draggable( "option", "axis", 'x' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
236 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
237
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
238 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
239 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
240 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
241
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
242
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
243 <li class="option" id="option-cancel">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
244 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
245 <h3 class="option-name"><a href="#option-cancel">cancel</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
246 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
247 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
248 <dd class="option-type">Selector</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
249
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
250 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
251 <dd class="option-default">':input,option'</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
252
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
253 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
254 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
255 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
256 <p>Prevents dragging from starting on specified elements.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
257 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
258 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
259 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
260 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
261
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
262 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
263 Initialize a draggable with the <code>cancel</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
264 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
265 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
266 <pre><code>$( ".selector" ).draggable({ cancel: 'button' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
267 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
268
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
269
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
270 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
271 Get or set the <code>cancel</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
272 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
273 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
274 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
275 var cancel = $( ".selector" ).draggable( "option", "cancel" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
276 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
277 $( ".selector" ).draggable( "option", "cancel", 'button' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
278 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
279
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
280 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
281 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
282 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
283
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
284
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
285 <li class="option" id="option-connectToSortable">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
286 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
287 <h3 class="option-name"><a href="#option-connectToSortable">connectToSortable</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
288 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
289 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
290 <dd class="option-type">Selector</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
291
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
292 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
293 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
294
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
295 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
296 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
297 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
298 <p>Allows the draggable to be dropped onto the specified sortables. If this option is used (<code>helper</code> must be set to 'clone' in order to work flawlessly), a draggable can be dropped onto a sortable list and then becomes part of it.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
299 </p><p>Note: Specifying this option as an array of selectors has been removed.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
300 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
301 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
302 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
303 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
304
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
305 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
306 Initialize a draggable with the <code>connectToSortable</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
307 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
308 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
309 <pre><code>$( ".selector" ).draggable({ connectToSortable: 'ul#myList' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
310 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
311
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
312
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
313 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
314 Get or set the <code>connectToSortable</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
315 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
316 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
317 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
318 var connectToSortable = $( ".selector" ).draggable( "option", "connectToSortable" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
319 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
320 $( ".selector" ).draggable( "option", "connectToSortable", 'ul#myList' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
321 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
322
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
323 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
324 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
325 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
326
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
327
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
328 <li class="option" id="option-containment">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
329 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
330 <h3 class="option-name"><a href="#option-containment">containment</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
331 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
332 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
333 <dd class="option-type">Selector, Element, String, Array</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
334
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
335 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
336 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
337
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
338 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
339 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
340 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
341 <p>Constrains dragging to within the bounds of the specified element or region. Possible string values: 'parent', 'document', 'window', [x1, y1, x2, y2].</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
342 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
343 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
344 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
345 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
346
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
347 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
348 Initialize a draggable with the <code>containment</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
349 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
350 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
351 <pre><code>$( ".selector" ).draggable({ containment: 'parent' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
352 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
353
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
354
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
355 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
356 Get or set the <code>containment</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
357 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
358 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
359 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
360 var containment = $( ".selector" ).draggable( "option", "containment" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
361 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
362 $( ".selector" ).draggable( "option", "containment", 'parent' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
363 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
364
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
365 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
366 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
367 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
368
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
369
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
370 <li class="option" id="option-cursor">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
371 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
372 <h3 class="option-name"><a href="#option-cursor">cursor</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
373 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
374 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
375 <dd class="option-type">String</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
376
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
377 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
378 <dd class="option-default">'auto'</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
379
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
380 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
381 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
382 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
383 <p>The css cursor during the drag operation.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
384 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
385 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
386 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
387 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
388
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
389 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
390 Initialize a draggable with the <code>cursor</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
391 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
392 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
393 <pre><code>$( ".selector" ).draggable({ cursor: 'crosshair' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
394 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
395
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
396
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
397 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
398 Get or set the <code>cursor</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
399 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
400 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
401 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
402 var cursor = $( ".selector" ).draggable( "option", "cursor" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
403 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
404 $( ".selector" ).draggable( "option", "cursor", 'crosshair' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
405 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
406
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
407 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
408 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
409 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
410
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
411
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
412 <li class="option" id="option-cursorAt">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
413 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
414 <h3 class="option-name"><a href="#option-cursorAt">cursorAt</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
415 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
416 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
417 <dd class="option-type">Object</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
418
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
419 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
420 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
421
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
422 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
423 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
424 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
425 <p>Sets the offset of the dragging helper relative to the mouse cursor. Coordinates can be given as a hash using a combination of one or two keys: <code>{ top, left, right, bottom }</code>.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
426 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
427 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
428 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
429 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
430
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
431 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
432 Initialize a draggable with the <code>cursorAt</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
433 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
434 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
435 <pre><code>$( ".selector" ).draggable({ cursorAt: { left: 5 } });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
436 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
437
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
438
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
439 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
440 Get or set the <code>cursorAt</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
441 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
442 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
443 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
444 var cursorAt = $( ".selector" ).draggable( "option", "cursorAt" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
445 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
446 $( ".selector" ).draggable( "option", "cursorAt", { left: 5 } );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
447 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
448
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
449 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
450 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
451 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
452
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
453
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
454 <li class="option" id="option-delay">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
455 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
456 <h3 class="option-name"><a href="#option-delay">delay</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
457 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
458 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
459 <dd class="option-type">Integer</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
460
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
461 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
462 <dd class="option-default">0</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
463
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
464 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
465 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
466 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
467 <p>Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
468 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
469 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
470 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
471 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
472
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
473 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
474 Initialize a draggable with the <code>delay</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
475 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
476 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
477 <pre><code>$( ".selector" ).draggable({ delay: 500 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
478 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
479
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
480
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
481 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
482 Get or set the <code>delay</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
483 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
484 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
485 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
486 var delay = $( ".selector" ).draggable( "option", "delay" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
487 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
488 $( ".selector" ).draggable( "option", "delay", 500 );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
489 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
490
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
491 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
492 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
493 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
494
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
495
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
496 <li class="option" id="option-distance">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
497 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
498 <h3 class="option-name"><a href="#option-distance">distance</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
499 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
500 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
501 <dd class="option-type">Integer</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
502
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
503 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
504 <dd class="option-default">1</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
505
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
506 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
507 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
508 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
509 <p>Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
510 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
511 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
512 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
513 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
514
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
515 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
516 Initialize a draggable with the <code>distance</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
517 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
518 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
519 <pre><code>$( ".selector" ).draggable({ distance: 30 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
520 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
521
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
522
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
523 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
524 Get or set the <code>distance</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
525 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
526 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
527 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
528 var distance = $( ".selector" ).draggable( "option", "distance" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
529 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
530 $( ".selector" ).draggable( "option", "distance", 30 );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
531 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
532
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
533 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
534 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
535 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
536
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
537
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
538 <li class="option" id="option-grid">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
539 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
540 <h3 class="option-name"><a href="#option-grid">grid</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
541 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
542 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
543 <dd class="option-type">Array</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
544
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
545 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
546 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
547
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
548 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
549 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
550 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
551 <p>Snaps the dragging helper to a grid, every x and y pixels. Array values: [x, y]</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
552 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
553 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
554 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
555 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
556
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
557 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
558 Initialize a draggable with the <code>grid</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
559 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
560 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
561 <pre><code>$( ".selector" ).draggable({ grid: [50, 20] });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
562 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
563
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
564
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
565 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
566 Get or set the <code>grid</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
567 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
568 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
569 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
570 var grid = $( ".selector" ).draggable( "option", "grid" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
571 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
572 $( ".selector" ).draggable( "option", "grid", [50, 20] );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
573 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
574
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
575 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
576 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
577 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
578
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
579
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
580 <li class="option" id="option-handle">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
581 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
582 <h3 class="option-name"><a href="#option-handle">handle</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
583 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
584 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
585 <dd class="option-type">Element, Selector</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
586
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
587 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
588 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
589
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
590 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
591 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
592 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
593 <p>If specified, restricts drag start click to the specified element(s).</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
594 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
595 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
596 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
597 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
598
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
599 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
600 Initialize a draggable with the <code>handle</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
601 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
602 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
603 <pre><code>$( ".selector" ).draggable({ handle: 'h2' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
604 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
605
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
606
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
607 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
608 Get or set the <code>handle</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
609 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
610 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
611 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
612 var handle = $( ".selector" ).draggable( "option", "handle" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
613 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
614 $( ".selector" ).draggable( "option", "handle", 'h2' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
615 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
616
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
617 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
618 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
619 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
620
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
621
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
622 <li class="option" id="option-helper">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
623 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
624 <h3 class="option-name"><a href="#option-helper">helper</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
625 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
626 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
627 <dd class="option-type">String, Function</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
628
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
629 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
630 <dd class="option-default">'original'</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
631
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
632 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
633 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
634 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
635 <p>Allows for a helper element to be used for dragging display. Possible values: 'original', 'clone', Function. If a function is specified, it must return a DOMElement.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
636 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
637 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
638 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
639 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
640
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
641 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
642 Initialize a draggable with the <code>helper</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
643 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
644 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
645 <pre><code>$( ".selector" ).draggable({ helper: 'clone' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
646 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
647
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
648
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
649 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
650 Get or set the <code>helper</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
651 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
652 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
653 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
654 var helper = $( ".selector" ).draggable( "option", "helper" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
655 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
656 $( ".selector" ).draggable( "option", "helper", 'clone' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
657 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
658
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
659 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
660 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
661 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
662
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
663
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
664 <li class="option" id="option-iframeFix">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
665 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
666 <h3 class="option-name"><a href="#option-iframeFix">iframeFix</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
667 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
668 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
669 <dd class="option-type">Boolean, Selector</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
670
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
671 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
672 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
673
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
674 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
675 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
676 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
677 <p>Prevent iframes from capturing the mousemove events during a drag. Useful in combination with cursorAt, or in any case, if the mouse cursor is not over the helper. If set to true, transparent overlays will be placed over all iframes on the page. If a selector is supplied, the matched iframes will have an overlay placed over them.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
678 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
679 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
680 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
681 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
682
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
683 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
684 Initialize a draggable with the <code>iframeFix</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
685 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
686 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
687 <pre><code>$( ".selector" ).draggable({ iframeFix: true });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
688 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
689
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
690
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
691 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
692 Get or set the <code>iframeFix</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
693 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
694 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
695 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
696 var iframeFix = $( ".selector" ).draggable( "option", "iframeFix" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
697 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
698 $( ".selector" ).draggable( "option", "iframeFix", true );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
699 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
700
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
701 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
702 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
703 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
704
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
705
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
706 <li class="option" id="option-opacity">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
707 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
708 <h3 class="option-name"><a href="#option-opacity">opacity</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
709 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
710 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
711 <dd class="option-type">Float</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
712
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
713 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
714 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
715
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
716 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
717 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
718 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
719 <p>Opacity for the helper while being dragged.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
720 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
721 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
722 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
723 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
724
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
725 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
726 Initialize a draggable with the <code>opacity</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
727 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
728 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
729 <pre><code>$( ".selector" ).draggable({ opacity: 0.35 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
730 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
731
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
732
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
733 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
734 Get or set the <code>opacity</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
735 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
736 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
737 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
738 var opacity = $( ".selector" ).draggable( "option", "opacity" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
739 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
740 $( ".selector" ).draggable( "option", "opacity", 0.35 );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
741 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
742
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
743 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
744 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
745 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
746
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
747
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
748 <li class="option" id="option-refreshPositions">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
749 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
750 <h3 class="option-name"><a href="#option-refreshPositions">refreshPositions</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
751 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
752 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
753 <dd class="option-type">Boolean</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
754
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
755 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
756 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
757
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
758 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
759 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
760 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
761 <p>If set to true, all droppable positions are calculated on every mousemove. Caution: This solves issues on highly dynamic pages, but dramatically decreases performance.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
762 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
763 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
764 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
765 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
766
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
767 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
768 Initialize a draggable with the <code>refreshPositions</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
769 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
770 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
771 <pre><code>$( ".selector" ).draggable({ refreshPositions: true });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
772 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
773
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
774
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
775 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
776 Get or set the <code>refreshPositions</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
777 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
778 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
779 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
780 var refreshPositions = $( ".selector" ).draggable( "option", "refreshPositions" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
781 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
782 $( ".selector" ).draggable( "option", "refreshPositions", true );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
783 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
784
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
785 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
786 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
787 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
788
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
789
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
790 <li class="option" id="option-revert">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
791 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
792 <h3 class="option-name"><a href="#option-revert">revert</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
793 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
794 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
795 <dd class="option-type">Boolean, String</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
796
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
797 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
798 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
799
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
800 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
801 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
802 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
803 <p>If set to true, the element will return to its start position when dragging stops. Possible string values: 'valid', 'invalid'. If set to invalid, revert will only occur if the draggable has not been dropped on a droppable. For valid, it's the other way around.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
804 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
805 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
806 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
807 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
808
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
809 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
810 Initialize a draggable with the <code>revert</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
811 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
812 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
813 <pre><code>$( ".selector" ).draggable({ revert: true });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
814 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
815
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
816
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
817 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
818 Get or set the <code>revert</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
819 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
820 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
821 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
822 var revert = $( ".selector" ).draggable( "option", "revert" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
823 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
824 $( ".selector" ).draggable( "option", "revert", true );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
825 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
826
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
827 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
828 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
829 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
830
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
831
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
832 <li class="option" id="option-revertDuration">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
833 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
834 <h3 class="option-name"><a href="#option-revertDuration">revertDuration</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
835 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
836 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
837 <dd class="option-type">Integer</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
838
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
839 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
840 <dd class="option-default">500</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
841
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
842 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
843 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
844 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
845 <p>The duration of the revert animation, in milliseconds. Ignored if revert is false.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
846 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
847 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
848 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
849 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
850
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
851 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
852 Initialize a draggable with the <code>revertDuration</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
853 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
854 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
855 <pre><code>$( ".selector" ).draggable({ revertDuration: 1000 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
856 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
857
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
858
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
859 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
860 Get or set the <code>revertDuration</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
861 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
862 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
863 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
864 var revertDuration = $( ".selector" ).draggable( "option", "revertDuration" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
865 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
866 $( ".selector" ).draggable( "option", "revertDuration", 1000 );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
867 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
868
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
869 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
870 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
871 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
872
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
873
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
874 <li class="option" id="option-scope">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
875 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
876 <h3 class="option-name"><a href="#option-scope">scope</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
877 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
878 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
879 <dd class="option-type">String</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
880
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
881 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
882 <dd class="option-default">'default'</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
883
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
884 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
885 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
886 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
887 <p>Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
888 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
889 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
890 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
891 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
892
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
893 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
894 Initialize a draggable with the <code>scope</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
895 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
896 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
897 <pre><code>$( ".selector" ).draggable({ scope: 'tasks' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
898 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
899
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
900
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
901 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
902 Get or set the <code>scope</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
903 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
904 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
905 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
906 var scope = $( ".selector" ).draggable( "option", "scope" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
907 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
908 $( ".selector" ).draggable( "option", "scope", 'tasks' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
909 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
910
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
911 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
912 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
913 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
914
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
915
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
916 <li class="option" id="option-scroll">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
917 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
918 <h3 class="option-name"><a href="#option-scroll">scroll</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
919 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
920 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
921 <dd class="option-type">Boolean</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
922
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
923 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
924 <dd class="option-default">true</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
925
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
926 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
927 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
928 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
929 <p>If set to true, container auto-scrolls while dragging.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
930 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
931 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
932 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
933 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
934
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
935 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
936 Initialize a draggable with the <code>scroll</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
937 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
938 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
939 <pre><code>$( ".selector" ).draggable({ scroll: false });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
940 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
941
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
942
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
943 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
944 Get or set the <code>scroll</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
945 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
946 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
947 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
948 var scroll = $( ".selector" ).draggable( "option", "scroll" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
949 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
950 $( ".selector" ).draggable( "option", "scroll", false );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
951 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
952
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
953 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
954 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
955 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
956
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
957
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
958 <li class="option" id="option-scrollSensitivity">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
959 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
960 <h3 class="option-name"><a href="#option-scrollSensitivity">scrollSensitivity</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
961 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
962 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
963 <dd class="option-type">Integer</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
964
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
965 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
966 <dd class="option-default">20</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
967
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
968 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
969 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
970 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
971 <p>Distance in pixels from the edge of the viewport after which the viewport should scroll. Distance is relative to pointer, not the draggable.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
972 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
973 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
974 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
975 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
976
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
977 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
978 Initialize a draggable with the <code>scrollSensitivity</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
979 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
980 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
981 <pre><code>$( ".selector" ).draggable({ scrollSensitivity: 40 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
982 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
983
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
984
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
985 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
986 Get or set the <code>scrollSensitivity</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
987 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
988 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
989 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
990 var scrollSensitivity = $( ".selector" ).draggable( "option", "scrollSensitivity" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
991 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
992 $( ".selector" ).draggable( "option", "scrollSensitivity", 40 );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
993 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
994
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
995 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
996 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
997 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
998
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
999
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1000 <li class="option" id="option-scrollSpeed">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1001 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1002 <h3 class="option-name"><a href="#option-scrollSpeed">scrollSpeed</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1003 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1004 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1005 <dd class="option-type">Integer</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1006
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1007 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1008 <dd class="option-default">20</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1009
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1010 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1011 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1012 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1013 <p>The speed at which the window should scroll once the mouse pointer gets within the <code>scrollSensitivity</code> distance.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1014 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1015 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1016 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1017 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1018
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1019 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1020 Initialize a draggable with the <code>scrollSpeed</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1021 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1022 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1023 <pre><code>$( ".selector" ).draggable({ scrollSpeed: 40 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1024 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1025
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1026
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1027 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1028 Get or set the <code>scrollSpeed</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1029 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1030 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1031 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1032 var scrollSpeed = $( ".selector" ).draggable( "option", "scrollSpeed" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1033 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1034 $( ".selector" ).draggable( "option", "scrollSpeed", 40 );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1035 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1036
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1037 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1038 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1039 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1040
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1041
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1042 <li class="option" id="option-snap">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1043 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1044 <h3 class="option-name"><a href="#option-snap">snap</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1045 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1046 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1047 <dd class="option-type">Boolean, Selector</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1048
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1049 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1050 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1051
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1052 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1053 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1054 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1055 <p>If set to a selector or to true (equivalent to '.ui-draggable'), the draggable will snap to the edges of the selected elements when near an edge of the element.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1056 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1057 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1058 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1059 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1060
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1061 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1062 Initialize a draggable with the <code>snap</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1063 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1064 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1065 <pre><code>$( ".selector" ).draggable({ snap: true });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1066 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1067
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1068
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1069 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1070 Get or set the <code>snap</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1071 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1072 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1073 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1074 var snap = $( ".selector" ).draggable( "option", "snap" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1075 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1076 $( ".selector" ).draggable( "option", "snap", true );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1077 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1078
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1079 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1080 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1081 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1082
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1083
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1084 <li class="option" id="option-snapMode">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1085 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1086 <h3 class="option-name"><a href="#option-snapMode">snapMode</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1087 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1088 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1089 <dd class="option-type">String</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1090
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1091 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1092 <dd class="option-default">'both'</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1093
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1094 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1095 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1096 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1097 <p>Determines which edges of snap elements the draggable will snap to. Ignored if snap is false. Possible values: 'inner', 'outer', 'both'</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1098 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1099 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1100 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1101 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1102
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1103 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1104 Initialize a draggable with the <code>snapMode</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1105 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1106 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1107 <pre><code>$( ".selector" ).draggable({ snapMode: 'outer' });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1108 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1109
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1110
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1111 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1112 Get or set the <code>snapMode</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1113 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1114 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1115 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1116 var snapMode = $( ".selector" ).draggable( "option", "snapMode" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1117 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1118 $( ".selector" ).draggable( "option", "snapMode", 'outer' );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1119 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1120
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1121 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1122 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1123 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1124
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1125
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1126 <li class="option" id="option-snapTolerance">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1127 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1128 <h3 class="option-name"><a href="#option-snapTolerance">snapTolerance</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1129 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1130 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1131 <dd class="option-type">Integer</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1132
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1133 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1134 <dd class="option-default">20</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1135
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1136 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1137 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1138 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1139 <p>The distance in pixels from the snap element edges at which snapping should occur. Ignored if snap is false.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1140 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1141 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1142 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1143 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1144
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1145 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1146 Initialize a draggable with the <code>snapTolerance</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1147 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1148 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1149 <pre><code>$( ".selector" ).draggable({ snapTolerance: 40 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1150 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1151
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1152
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1153 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1154 Get or set the <code>snapTolerance</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1155 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1156 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1157 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1158 var snapTolerance = $( ".selector" ).draggable( "option", "snapTolerance" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1159 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1160 $( ".selector" ).draggable( "option", "snapTolerance", 40 );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1161 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1162
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1163 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1164 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1165 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1166
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1167
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1168 <li class="option" id="option-stack">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1169 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1170 <h3 class="option-name"><a href="#option-stack">stack</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1171 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1172 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1173 <dd class="option-type">Selector</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1174
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1175 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1176 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1177
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1178 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1179 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1180 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1181 <p>Controls the z-Index of the set of elements that match the selector, always brings to front the dragged item. Very useful in things like window managers.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1182 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1183 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1184 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1185 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1186
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1187 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1188 Initialize a draggable with the <code>stack</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1189 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1190 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1191 <pre><code>$( ".selector" ).draggable({ stack: &quot;.products&quot; });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1192 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1193
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1194
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1195 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1196 Get or set the <code>stack</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1197 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1198 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1199 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1200 var stack = $( ".selector" ).draggable( "option", "stack" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1201 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1202 $( ".selector" ).draggable( "option", "stack", &quot;.products&quot; );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1203 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1204
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1205 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1206 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1207 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1208
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1209
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1210 <li class="option" id="option-zIndex">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1211 <div class="option-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1212 <h3 class="option-name"><a href="#option-zIndex">zIndex</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1213 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1214 <dt class="option-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1215 <dd class="option-type">Integer</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1216
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1217 <dt class="option-default-label">Default:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1218 <dd class="option-default">false</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1219
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1220 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1221 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1222 <div class="option-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1223 <p>z-index for the helper while being dragged.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1224 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1225 <div class="option-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1226 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1227 <dl class="option-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1228
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1229 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1230 Initialize a draggable with the <code>zIndex</code> option specified.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1231 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1232 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1233 <pre><code>$( ".selector" ).draggable({ zIndex: 2700 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1234 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1235
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1236
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1237 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1238 Get or set the <code>zIndex</code> option, after init.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1239 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1240 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1241 <pre><code>//getter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1242 var zIndex = $( ".selector" ).draggable( "option", "zIndex" );
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1243 //setter
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1244 $( ".selector" ).draggable( "option", "zIndex", 2700 );</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1245 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1246
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1247 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1248 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1249 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1250
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1251 </ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1252 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1253 <div id="events">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1254 <h2 class="top-header">Events</h2>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1255 <ul class="events-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1256
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1257 <li class="event" id="event-create">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1258 <div class="event-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1259 <h3 class="event-name"><a href="#event-create">create</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1260 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1261 <dt class="event-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1262 <dd class="event-type">dragcreate</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1263 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1264 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1265 <div class="event-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1266 <p>This event is triggered when draggable is created.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1267 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1268 <div class="event-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1269 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1270 <dl class="event-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1271
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1272 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1273 Supply a callback function to handle the <code>create</code> event as an init option.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1274 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1275 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1276 <pre><code>$( &quot;.selector&quot; ).draggable({
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1277 create: function(event, ui) { ... }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1278 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1279 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1280
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1281
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1282 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1283 Bind to the <code>create</code> event by type: <code>dragcreate</code>.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1284 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1285 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1286 <pre><code>$( &quot;.selector&quot; ).bind( &quot;dragcreate&quot;, function(event, ui) {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1287 ...
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1288 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1289 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1290
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1291 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1292 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1293 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1294
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1295
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1296 <li class="event" id="event-start">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1297 <div class="event-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1298 <h3 class="event-name"><a href="#event-start">start</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1299 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1300 <dt class="event-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1301 <dd class="event-type">dragstart</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1302 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1303 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1304 <div class="event-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1305 <p>This event is triggered when dragging starts.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1306 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1307 <div class="event-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1308 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1309 <dl class="event-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1310
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1311 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1312 Supply a callback function to handle the <code>start</code> event as an init option.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1313 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1314 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1315 <pre><code>$( &quot;.selector&quot; ).draggable({
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1316 start: function(event, ui) { ... }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1317 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1318 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1319
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1320
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1321 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1322 Bind to the <code>start</code> event by type: <code>dragstart</code>.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1323 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1324 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1325 <pre><code>$( &quot;.selector&quot; ).bind( &quot;dragstart&quot;, function(event, ui) {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1326 ...
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1327 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1328 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1329
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1330 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1331 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1332 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1333
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1334
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1335 <li class="event" id="event-drag">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1336 <div class="event-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1337 <h3 class="event-name"><a href="#event-drag">drag</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1338 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1339 <dt class="event-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1340 <dd class="event-type">drag</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1341 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1342 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1343 <div class="event-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1344 <p>This event is triggered when the mouse is moved during the dragging.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1345 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1346 <div class="event-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1347 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1348 <dl class="event-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1349
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1350 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1351 Supply a callback function to handle the <code>drag</code> event as an init option.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1352 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1353 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1354 <pre><code>$( &quot;.selector&quot; ).draggable({
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1355 drag: function(event, ui) { ... }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1356 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1357 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1358
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1359
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1360 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1361 Bind to the <code>drag</code> event by type: <code>drag</code>.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1362 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1363 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1364 <pre><code>$( &quot;.selector&quot; ).bind( &quot;drag&quot;, function(event, ui) {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1365 ...
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1366 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1367 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1368
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1369 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1370 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1371 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1372
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1373
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1374 <li class="event" id="event-stop">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1375 <div class="event-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1376 <h3 class="event-name"><a href="#event-stop">stop</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1377 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1378 <dt class="event-type-label">Type:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1379 <dd class="event-type">dragstop</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1380 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1381 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1382 <div class="event-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1383 <p>This event is triggered when dragging stops.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1384 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1385 <div class="event-examples">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1386 <h4>Code examples</h4>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1387 <dl class="event-examples-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1388
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1389 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1390 Supply a callback function to handle the <code>stop</code> event as an init option.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1391 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1392 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1393 <pre><code>$( &quot;.selector&quot; ).draggable({
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1394 stop: function(event, ui) { ... }
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1395 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1396 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1397
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1398
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1399 <dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1400 Bind to the <code>stop</code> event by type: <code>dragstop</code>.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1401 </dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1402 <dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1403 <pre><code>$( &quot;.selector&quot; ).bind( &quot;dragstop&quot;, function(event, ui) {
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1404 ...
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1405 });</code></pre>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1406 </dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1407
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1408 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1409 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1410 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1411
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1412 </ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1413 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1414 <div id="methods">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1415 <h2 class="top-header">Methods</h2>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1416 <ul class="methods-list">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1417
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1418 <li class="method" id="method-destroy">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1419 <div class="method-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1420 <h3 class="method-name"><a href="#method-destroy">destroy</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1421 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1422 <dt class="method-signature-label">Signature:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1423 <dd class="method-signature">.draggable( "destroy"
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1424
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1425
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1426
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1427
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1428
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1429
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1430
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1431 )</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1432 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1433 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1434 <div class="method-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1435 <p>Remove the draggable functionality completely. This will return the element back to its pre-init state.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1436 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1437 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1438
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1439
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1440 <li class="method" id="method-disable">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1441 <div class="method-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1442 <h3 class="method-name"><a href="#method-disable">disable</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1443 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1444 <dt class="method-signature-label">Signature:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1445 <dd class="method-signature">.draggable( "disable"
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1446
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1447
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1448
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1449
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1450
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1451
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1452
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1453 )</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1454 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1455 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1456 <div class="method-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1457 <p>Disable the draggable.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1458 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1459 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1460
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1461
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1462 <li class="method" id="method-enable">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1463 <div class="method-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1464 <h3 class="method-name"><a href="#method-enable">enable</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1465 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1466 <dt class="method-signature-label">Signature:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1467 <dd class="method-signature">.draggable( "enable"
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1468
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1469
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1470
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1471
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1472
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1473
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1474
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1475 )</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1476 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1477 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1478 <div class="method-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1479 <p>Enable the draggable.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1480 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1481 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1482
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1483
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1484 <li class="method" id="method-option">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1485 <div class="method-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1486 <h3 class="method-name"><a href="#method-option">option</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1487 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1488 <dt class="method-signature-label">Signature:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1489 <dd class="method-signature">.draggable( "option"
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1490
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1491 , optionName
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1492
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1493 , <span class="optional">[</span>value<span class="optional">] </span>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1494
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1495
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1496
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1497 )</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1498 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1499 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1500 <div class="method-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1501 <p>Get or set any draggable option. If no value is specified, will act as a getter.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1502 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1503 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1504
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1505
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1506 <li class="method" id="method-option">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1507 <div class="method-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1508 <h3 class="method-name"><a href="#method-option">option</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1509 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1510 <dt class="method-signature-label">Signature:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1511 <dd class="method-signature">.draggable( "option"
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1512
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1513 , options
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1514
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1515
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1516
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1517
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1518
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1519 )</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1520 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1521 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1522 <div class="method-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1523 <p>Set multiple draggable options at once by providing an options object.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1524 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1525 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1526
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1527
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1528 <li class="method" id="method-widget">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1529 <div class="method-header">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1530 <h3 class="method-name"><a href="#method-widget">widget</a></h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1531 <dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1532 <dt class="method-signature-label">Signature:</dt>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1533 <dd class="method-signature">.draggable( "widget"
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1534
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1535
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1536
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1537
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1538
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1539
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1540
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1541 )</dd>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1542 </dl>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1543 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1544 <div class="method-description">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1545 <p>Returns the .ui-draggable element.</p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1546 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1547 </li>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1548
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1549
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1550 </ul>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1551 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1552 <div id="theming">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1553 <h2 class="top-header">Theming</h2>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1554 <p>The jQuery UI Draggable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1555 </p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1556 <p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.draggable.css stylesheet that can be modified. These classes are highlighed in bold below.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1557 </p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1558
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1559 <h3>Sample markup with jQuery UI CSS Framework classes</h3>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1560 &lt;div class=&quot;<strong>ui-draggable</strong>&quot;&gt;&lt;/div&gt;
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1561 <p class="theme-note">
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1562 <strong>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1563 Note: This is a sample of markup generated by the draggable plugin, not markup you should use to create a draggable. The only markup needed for that is &lt;div&gt;&lt;/div&gt;.
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1564 </strong>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1565 </p>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1566
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1567 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1568 </div>
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1569
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1570 </p><!--
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1571 Pre-expand include size: 61392 bytes
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1572 Post-expand include size: 107565 bytes
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1573 Template argument size: 58710 bytes
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1574 Maximum: 2097152 bytes
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1575 -->
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1576
b2e4605f20b2 beta version
dwinter
parents:
diff changeset
1577 <!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3768-1!1!0!!en!2 and timestamp 20110315194328 -->