Skip to content
This repository
Newer
Older
100644 316 lines (314 sloc) 14.446 kb
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
1 <?xml version="1.0"?>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
2 <entry name="tabs" type="widget" animated-element="panel" widget-element="tabs container">
3 <title>Tabs Widget</title>
4 <desc>A single content area with multiple panels, each associated with a header in a list.</desc>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
5 <longdesc>
0acbbf4c »
2012-05-29 Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
6 <p>Tabs are generally used to break content into multiple sections that can be swapped to save space, much like an accordion.</p>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
7
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
8 <p>The content for each tab panel can be defined in-page or can be loaded via Ajax; both are handled automatically based on the <code>href</code> of the anchor associated with the tab. By default tabs are activated on click, but the events can be changed to hover via the <a href="#option-event"><code>event</code></a> option.</p>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
9 </longdesc>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
10 <note id="functional-css"/>
11 <added>1.0</added>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
12 <options>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
13 <option name="ajaxOptions" type="Object" default="null">
14 <desc>Additional Ajax options to consider when loading tab content (see <a href="http://api.jquery.com/jQuery.ajax/"><code>jQuery.ajax()</code></a>).</desc>
15 </option>
16 <option name="cache" type="Boolean" default="false">
17 <desc>Whether or not to cache remote tabs content, e.g., load only once or with every click. Cached content is being lazy loaded, e.g., once and only once for the first click. Note that to prevent the actual Ajax requests from being cached by the browser you need to provide an extra <code>cache: false</code> flag in the <a href="#option-ajaxOptions"><code>ajaxOptions</code></a> option.</desc>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
18 </option>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
19 <option name="collapsible" type="Boolean" default="false">
20 <desc>When set to <code>true</code>, the active panel can be closed.</desc>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
21 </option>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
22 <option name="cookie" type="Object" default="null">
23 <desc>Store the latest selected tab in a cookie. The cookie is then used to determine the initially selected tab if the <a href="#option-selected"><code>selected</code></a> option is not defined. Requires the cookie plugin, which can also be found in the development-bundle-external folder from the download builder. The object needs to have key/value pairs of the form the cookie plugin expects as options. Example: <code>{ expires 7, path: "/", domain: "jquerycom", secure: true }</code>. Since jQuery UI 1.7 it is also possible to define the cookie name being used via the <code>name</code> property.</desc>
24 </option>
25 <option name="disabled" default="false">
26 <desc>Which tabs are disabled.</desc>
27 <type name="Boolean">
28 <desc>Enable or disable all tabs.</desc>
29 </type>
30 <type name="Array">
31 <desc>An array containing the zero-based indexes of the tabs that should be disabled, e.g., <code>[ 0, 2 ]</code> would disable the first and third tab.</desc>
32 </type>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
33 </option>
34 <option name="event" type="String" default='"click"'>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
35 <desc>The type of event that the tabs should react to in order to activate the tab. To activate on hover, use <code>"mouseover"</code>.</desc>
36 </option>
37 <option name="fx" default="null">
38 <desc>Enable animations for hidniga nd showing tab panels.</desc>
39 <type name="Object">
40 <desc>Key/value pairs of properties to animate and optional duration, e.g., <code>{ height: "toggle", duration: 200 }</code>.</desc>
41 </type>
42 <type name="Array">
43 <desc>Animation settings in the form <code>[ hideSettings, showSettings ]</code>.</desc>
44 </type>
45 </option>
46 <option name="idPrefix" type="String" default='"ui-tabs-"'>
47 <desc>If the remote tab, its anchor element that is, has no title attribute to generate an id from, an id/fragment identifier is created from this prefix and a unique id, for example <code>"ui-tabs-54"</code>.</desc>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
48 </option>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
49 <option name="panelTemplate" type="String" default='"&lt;div>&lt;/div>"'>
50 <desc>HTML template from which a new tab panel is created in case of adding a tab with the <a href="#method-add"><code>add()</code></a> method or when creating a panel for a remote tab on the fly.</desc>
51 </option>
b174ec06 »
2013-08-28 Tabs: Selected option doesn't support booleans. Fixes #162.
52 <option name="selected" type="Integer" default="0">
0acbbf4c »
2012-05-29 Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
53 <desc>
b174ec06 »
2013-08-28 Tabs: Selected option doesn't support booleans. Fixes #162.
54 The zero-based index of the panel that is selected (open). Setting <code>selected</code> to <code>-1</code> will collapse all panels. This requires the <a href="#option-collapsible"><code>collapsible</code></a> option to be <code>true</code>.
0acbbf4c »
2012-05-29 Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
55 </desc>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
56 </option>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
57 <option name="spinner" type="String" default='"&lt;em>Loading&amp;#8230;&lt;/em>"'>
58 <desc>The HTML content to show in a tab title while remote content is loading. Set this option to an empty string to deactivate the spinner behavior. A span element must be present in the anchor tag of the title for the spinner content to be visible.</desc>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
59 </option>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
60 <option name="tabTemplate" type="String" default='"&lt;li>&lt;a href="#{href}">&lt;span>#{label}&lt;/span>&lt;/a>&lt;/li>"'>
61 <desc>HTML template from which a new tab is created and added. The placeholders <code>#{href}</code> and <code>#{label}</code> are replaced with the URL and tab label that are passed as arguments to the <a href="#method-add"><code>add()</code></a> method.</desc>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
62 </option>
63 </options>
64 <events>
d76939b8 »
2012-05-25 Add create event to widgets and interactions, along with minor cleanups
65 <event name="create">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
66 <desc>Triggered when the tabs are created.</desc>
67 <argument name="event" type="Event"/>
68 <argument name="ui" type="Object"/>
d76939b8 »
2012-05-25 Add create event to widgets and interactions, along with minor cleanups
69 </event>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
70 <event name="add">
71 <desc>Triggered when a tab is added.</desc>
72 <argument name="event" type="Event"/>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
73 <argument name="ui" type="Object">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
74 <property name="tab" type="Element">
75 <desc>The tab that is being added.</desc>
76 </property>
77 <property name="panel" type="Element">
78 <desc>The panel that is being added.</desc>
79 </property>
80 <property name="index" type="Integer">
81 <desc>The zero-based index of the tab.</desc>
82 </property>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
83 </argument>
84 </event>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
85 <event name="disable">
86 <desc>Triggered when a tab is disabled.</desc>
87 <argument name="event" type="Event"/>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
88 <argument name="ui" type="Object">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
89 <property name="tab" type="Element">
90 <desc>The tab that is being disabled.</desc>
91 </property>
92 <property name="panel" type="Element">
93 <desc>The panel that is being disabled.</desc>
94 </property>
95 <property name="index" type="Integer">
96 <desc>The zero-based index of the tab.</desc>
97 </property>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
98 </argument>
99 </event>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
100 <event name="enable">
101 <desc>Triggered when a tab is enabled.</desc>
102 <argument name="event" type="Event"/>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
103 <argument name="ui" type="Object">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
104 <property name="tab" type="Element">
105 <desc>The tab that is being enabled.</desc>
106 </property>
107 <property name="panel" type="Element">
108 <desc>The panel that is being enabled.</desc>
109 </property>
110 <property name="index" type="Integer">
111 <desc>The zero-based index of the tab.</desc>
112 </property>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
113 </argument>
114 </event>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
115 <event name="load" type="tabsload">
116 <desc>Triggered after a remote tab has been loaded.</desc>
117 <argument name="event" type="Event"/>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
118 <argument name="ui" type="Object">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
119 <property name="tab" type="jQuery">
120 <desc>The tab that was just loaded.</desc>
121 </property>
122 <property name="panel" type="jQuery">
123 <desc>The panel which was just populated by the Ajax response.</desc>
124 </property>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
125 </argument>
126 </event>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
127 <event name="remove">
128 <desc>Triggered when a tab is removed.</desc>
129 <argument name="event" type="Event"/>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
130 <argument name="ui" type="Object">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
131 <property name="tab" type="Element">
132 <desc>The tab that is being removed.</desc>
133 </property>
134 <property name="panel" type="Element">
135 <desc>The panel that is being removed.</desc>
136 </property>
137 <property name="index" type="Integer">
138 <desc>The zero-based index of the tab.</desc>
139 </property>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
140 </argument>
141 </event>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
142 <event name="select" type="tabsselect">
143 <desc>Triggered directly after a tab is selected. Can be canceled to prevent the tab from being selected.</desc>
144 <argument name="event" type="Event"/>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
145 <argument name="ui" type="Object">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
146 <property name="tab" type="Element">
147 <desc>The tab that is about to be selected.</desc>
148 </property>
149 <property name="panel" type="Element">
150 <desc>The panel that is about to be selected.</desc>
151 </property>
152 <property name="index" type="Integer">
153 <desc>The zero-based index of the tab.</desc>
154 </property>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
155 </argument>
156 </event>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
157 <event name="show" type="tabsshow">
158 <desc>Triggered after a tab has been selected (after animation completes).</desc>
159 <argument name="event" type="Event"/>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
160 <argument name="ui" type="Object">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
161 <property name="tab" type="Element">
162 <desc>The tab that was just selected.</desc>
163 </property>
164 <property name="panel" type="Element">
165 <desc>The panel that was just selected.</desc>
166 </property>
167 <property name="index" type="Integer">
168 <desc>The zero-based index of the tab.</desc>
169 </property>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
170 </argument>
171 </event>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
172 </events>
173 <methods>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
174 <method name="abort">
175 <desc>Terminate all running tab ajax requests and animations.</desc>
176 </method>
177 <method name="add">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
178 <desc>Add a tab.</desc>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
179 <argument name="url" type="String">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
180 <desc>The URL of the tab to add.</desc>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
181 </argument>
182 <argument name="label" type="String">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
183 <desc>The name of the tab to add.</desc>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
184 </argument>
185 <argument name="index" type="Number" optional="true">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
186 <desc>Where to add the new tab (zero-based). If omitted, the new tab will be added as the last tab.</desc>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
187 </argument>
188 </method>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
189 <xi:include href="../includes/widget-method-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
6b2fe038 »
2012-05-25 Add disable/enable/option/widget methods
190 <method name="disable">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
191 <signature>
192 <desc>Disables all tabs.</desc>
193 </signature>
194 <signature>
195 <desc>
196 Disables a tab. The selected tab cannot be disabled. To disable more than one tab at once, set the <a href="#option-disabled"><code>disabled</code></a> option: <code>$( "#tabs" ).tabs( "option", "disabled", [ 1, 2, 3 ] )</code>.
197 </desc>
198 <argument name="index">
199 <desc>Which tab to disable.</desc>
200 <type name="Number">
201 <desc>The zero-based index of the tab to disable.</desc>
202 </type>
203 <type name="String">
204 <desc>The <code>href</code> of the tab to disable.</desc>
205 </type>
206 </argument>
207 </signature>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
208 </method>
6b2fe038 »
2012-05-25 Add disable/enable/option/widget methods
209 <method name="enable">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
210 <signature>
211 <desc>Enables all tabs.</desc>
212 </signature>
213 <signature>
214 <desc>Enables a tab. To enable more than one tab at once reset the disabled property like: <code>$( "#example" ).tabs( "option", "disabled", [] );</code>.</desc>
215 <argument name="index">
216 <desc>Which tab to enable.</desc>
217 <type name="Number">
218 <desc>The zero-based index of the tab to enable.</desc>
219 </type>
220 <type name="String">
221 <desc>The <code>href</code> of the tab to enable.</desc>
222 </type>
223 </argument>
224 </signature>
6b2fe038 »
2012-05-25 Add disable/enable/option/widget methods
225 </method>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
226 <method name="length" return="Integer">
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
227 <desc>Retrieve the number of tabs of the first matched tab pane.</desc>
228 </method>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
229 <method name="load">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
230 <desc>Loads the panel content of a remote tab.</desc>
231 <argument name="index">
232 <desc>Which tab to load.</desc>
233 <type name="Number">
234 <desc>The zero-based index of the tab to load.</desc>
235 </type>
236 <type name="String">
237 <desc>The <code>href</code> of the tab to load.</desc>
238 </type>
6b2fe038 »
2012-05-25 Add disable/enable/option/widget methods
239 </argument>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
240 </method>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
241 <method name="remove">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
242 <desc>Remove a tab.</desc>
243 <argument name="index">
244 <desc>Which tab to remove.</desc>
245 <type name="Number">
246 <desc>The zero-based index of the tab to remove.</desc>
247 </type>
248 <type name="String">
249 <desc>The <code>href</code> of the tab to remove.</desc>
250 </type>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
251 </argument>
252 </method>
253 <method name="rotate">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
254 <desc>Set up an automation rotation through the tabs.</desc>
255 <argument name="duration" type="Number">
256 <desc>The duration in milliseconds for each tab to be visible before rotating to the next tab.</desc>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
257 </argument>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
258 <argument name="continuing" type="Boolean" default="false" optional="true">
259 <desc>Whether or not to continue the rotation after a tab has been selected by a user.</desc>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
260 </argument>
261 </method>
262 <method name="select">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
263 <desc>Select a tab, as if it were clicked.</desc>
264 <argument name="index">
265 <desc>Which tab to select.</desc>
266 <type name="Number">
267 <desc>The zero-based index of the tab to load.</desc>
268 </type>
269 <type name="String">
270 <desc>The <code>href</code> of the tab to load.</desc>
271 </type>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
272 </argument>
273 </method>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
274 <xi:include href="../includes/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
275 <method name="url">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
276 <desc>Change the URL from whcih an Ajax (remote) tab will be loaded. The specified URL will be used for subsequent loads. Note that you can not only change the URL for an existing remote tab with this method, but also turn an in-page tab into a remote tab.</desc>
277 <argument name="index" type="Integer">
278 <desc>The zero-based index of the tab to update.</desc>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
279 </argument>
280 <argument name="url" type="String">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
281 <desc>The URL to set for the tab.</desc>
c51441e8 »
2012-06-19 Tabs: Revert to 1.8 API
282 </argument>
283 </method>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
284 <xi:include href="../includes/widget-method-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
285 </methods>
286 <example>
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
287 <desc>A simple jQuery UI Tabs</desc>
288 <code><![CDATA[
289 $( "#tabs" ).tabs();
290 ]]></code>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
291 <html><![CDATA[
292 <div id="tabs">
04f54fac »
2012-09-17 Update dependencies, merge docs from master.
293 <ul>
294 <li><a href="#fragment-1"><span>One</span></a></li>
295 <li><a href="#fragment-2"><span>Two</span></a></li>
296 <li><a href="#fragment-3"><span>Three</span></a></li>
297 </ul>
298 <div id="fragment-1">
299 <p>First tab is active by default:</p>
300 <pre><code>$( "#tabs" ).tabs(); </code></pre>
301 </div>
302 <div id="fragment-2">
303 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
304 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
305 </div>
306 <div id="fragment-3">
307 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
308 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
309 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
310 </div>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
311 </div>
312 ]]></html>
313 </example>
80ecaf46 »
2012-05-25 Fixed entries2html based on the one in api.jquery.com to put the scri…
314 <category slug="widgets"/>
f1b270b7 »
2012-05-25 Initial import from jquery-docs repo. New home :)
315 </entry>
Something went wrong with that request. Please try again.