Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 122 lines (121 sloc) 5.587 kb
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
1 <?xml version="1.0"?>
21f6c28 @scottgonzalez Added placeholder for which element is returned by the widget() method.
scottgonzalez authored
2 <entry name="selectable" type="widget" widget-element="selectable element">
12f32df @scottgonzalez Added <title> for page titles.
scottgonzalez authored
3 <title>Selectable Widget</title>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
4 <desc>Use the mouse to select elements, individually or in a group.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
5 <longdesc>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
6 <p>The jQuery UI Selectable plugin allows for elements to be selected by dragging a box (sometimes called a lasso) with the mouse over the elements. Elements can also be selected via click or drag while holding the ctrl/meta key, allowing for multiple (non-contiguous) selections.</p>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
7 </longdesc>
21606fa @scottgonzalez Moved functional CSS comment into resuable note.
scottgonzalez authored
8 <note id="functional-css"/>
24e33d1 @scottgonzalez Change <created> to <added> and display in output. Fixes #33.
scottgonzalez authored
9 <added>1.0</added>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
10 <options>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
11 <option name="autoRefresh" type="Boolean" default="true">
12 <desc>This determines whether to refresh (recalculate) the position and size of each selectee at the beginning of each select operation. If you have many items, you may want to set this to false and call the <a href="#method-refresh"><code>refresh()</code></a> method manually.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
13 </option>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
14 <option name="cancel" type="Selector" default='"input,textarea,button,select,option"'>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
15 <desc>Prevents selecting if you start on elements matching the selector.</desc>
16 </option>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
17 <option name="delay" type="Integer" default="0">
18 <desc>Time in milliseconds to define when the selecting should start. This helps prevent unwanted selections when clicking on an element.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
19 </option>
47e8351 @scottgonzalez Renamed widget-disabled.xml to widget-option-disabled.xml.
scottgonzalez authored
20 <xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
21 <option name="distance" type="Number" default="0">
22 <desc>Tolerance, in pixels, for when selecting should start. If specified, selecting will not start until the mouse has been dragged beyond the specified distance.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
23 </option>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
24 <option name="filter" type="Selector" default='"*"'>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
25 <desc>The matching child elements will be made selectees (able to be selected).</desc>
26 </option>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
27 <option name="tolerance" type="String" default='"touch"'>
571340e @jzaefferer Selectable: Cleanup
jzaefferer authored
28 <desc>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
29 Specifies which mode to use for testing whether the lasso should select an item. Possible values:
571340e @jzaefferer Selectable: Cleanup
jzaefferer authored
30 <ul>
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
31 <li><code>"fit"</code>: Lasso overlaps the item entirely.</li>
32 <li><code>"touch"</code>: Lasso overlaps the item by any amount.</li>
571340e @jzaefferer Selectable: Cleanup
jzaefferer authored
33 </ul>
34 </desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
35 </option>
36 </options>
37 <events>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
38 <xi:include href="../includes/widget-event-create.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
39 <event name="selected" type="selectableselected">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
40 <desc>Triggered at the end of the select operation, on each element added to the selection.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
41 <argument name="event" type="Event"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
42 <argument name="ui" type="Object">
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
43 <property name="selected" type="Element">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
44 <desc>The selectable item that has been selected.</desc>
ec118d7 @kborchers Moved/added remaining ui-event props to events. Fixes #2
kborchers authored
45 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
46 </argument>
47 </event>
48 <event name="selecting" type="selectableselecting">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
49 <desc>Triggered during the select operation, on each element added to the selection.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
50 <argument name="event" type="Event"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
51 <argument name="ui" type="Object">
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
52 <property name="selecting" type="Element">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
53 <desc>The current selectable item being selected.</desc>
ec118d7 @kborchers Moved/added remaining ui-event props to events. Fixes #2
kborchers authored
54 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
55 </argument>
56 </event>
57 <event name="start" type="selectablestart">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
58 <desc>Triggered at the beginning of the select operation.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
59 <argument name="event" type="Event"/>
60 <argument name="ui" type="Object"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
61 </event>
62 <event name="stop" type="selectablestop">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
63 <desc>Triggered at the end of the select operation.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
64 <argument name="event" type="Event"/>
65 <argument name="ui" type="Object"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
66 </event>
67 <event name="unselected" type="selectableunselected">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
68 <desc>Triggered at the end of the select operation, on each element removed from the selection.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
69 <argument name="event" type="Event"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
70 <argument name="ui" type="Object">
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
71 <property name="unselected" type="Element">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
72 <desc>The selectable item that has been unselected.</desc>
ec118d7 @kborchers Moved/added remaining ui-event props to events. Fixes #2
kborchers authored
73 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
74 </argument>
75 </event>
76 <event name="unselecting" type="selectableunselecting">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
77 <desc>Triggered during the select operation, on each element removed from the selection.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
78 <argument name="event" type="Event"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
79 <argument name="ui" type="Object">
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
80 <property name="unselecting" type="Element">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
81 <desc>The current selectable item being unselected.</desc>
ec118d7 @kborchers Moved/added remaining ui-event props to events. Fixes #2
kborchers authored
82 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
83 </argument>
84 </event>
85 </events>
86 <methods>
c6ac15f @scottgonzalez Updated widget factory and base widget docs.
scottgonzalez authored
87 <xi:include href="../includes/widget-method-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
88 <xi:include href="../includes/widget-method-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
89 <xi:include href="../includes/widget-method-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
90 <method name="refresh">
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
91 <desc>Refresh the position and size of each selectee element. This method can be used to manually recalculate the position and size of each selectee when the <a href="#option-autoRefresh"><code>autoRefresh</code></a> option is set to <code>false</code>.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
92 </method>
6c710f7 @scottgonzalez Renamed inherits to includes.
scottgonzalez authored
93 <xi:include href="../includes/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
c6ac15f @scottgonzalez Updated widget factory and base widget docs.
scottgonzalez authored
94 <xi:include href="../includes/widget-method-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
95 </methods>
96 <example>
136df88 @scottgonzalez Adjusted demo heights.
scottgonzalez authored
97 <height>150</height>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
98 <desc>A simple jQuery UI Selectable.</desc>
d29d212 @jzaefferer Fix examples/demos. Will fix #24, pending a change to web-base-template
jzaefferer authored
99 <css><![CDATA[
100 #selectable .ui-selecting {
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
101 background: #ccc;
d29d212 @jzaefferer Fix examples/demos. Will fix #24, pending a change to web-base-template
jzaefferer authored
102 }
103 #selectable .ui-selected {
9f29381 @scottgonzalez Selectable: Updated docs.
scottgonzalez authored
104 background: #999;
d29d212 @jzaefferer Fix examples/demos. Will fix #24, pending a change to web-base-template
jzaefferer authored
105 }
106 ]]></css>
56363d1 @scottgonzalez Selectable: Whitespace.
scottgonzalez authored
107 <code><![CDATA[
108 $( "#selectable" ).selectable();
109 ]]></code>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
110 <html><![CDATA[
111 <ul id="selectable">
d29d212 @jzaefferer Fix examples/demos. Will fix #24, pending a change to web-base-template
jzaefferer authored
112 <li>Item 1</li>
113 <li>Item 2</li>
114 <li>Item 3</li>
115 <li>Item 4</li>
116 <li>Item 5</li>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
117 </ul>
118 ]]></html>
119 </example>
80ecaf4 @rdworth Fixed entries2html based on the one in api.jquery.com to put the scri…
rdworth authored
120 <category slug="interactions"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
121 </entry>
Something went wrong with that request. Please try again.