Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 323 lines (313 sloc) 16.773 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="tabs" type="widget" animated-element="panel" widget-element="tabs container">
12f32df @scottgonzalez Added <title> for page titles.
scottgonzalez authored
3 <title>Tabs Widget</title>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
4 <desc>A single content area with multiple panels, each associated with a header in a list.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
5 <longdesc>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid anywa...
jzaefferer authored
6 <p>Tabs are generally used to break content into multiple sections that can be swapped to save space, much like an accordion.</p>
b733b36 @kborchers Tabs: Document the expected markup. Fixes #133. Closes gh-163
kborchers authored
7 <p>Tabs have a particular set of markup that must be used in order for them to work properly:</p>
8 <ul>
9 <li>The tabs themselves must be in either an ordered (<code>&lt;ol></code>) or unordered (<code>&lt;ul></code>) list</li>
10 <li>Each tab "title" must be inside of a list item (<code>&lt;li></code>) and wrapped by an anchor (<code>&lt;a></code>) with an <code>href</code> attribute</li>
11 <li>Each tab panel may be any valid element but it must have an id which corresponds to the hash in the anchor of the associated tab.</li>
12 </ul>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
13
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
14 <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>
675a0b0 @scottgonzalez Tabs: Added keyboard interaction notes.
scottgonzalez authored
15
b733b36 @kborchers Tabs: Document the expected markup. Fixes #133. Closes gh-163
kborchers authored
16 <p>Below is some sample markup:</p>
17
18 <pre><code><![CDATA[
19 <div id="tabs">
20 <ul>
21 <li><a href="#fragment-1">One</a></li>
22 <li><a href="#fragment-2">Two</a></li>
23 <li><a href="#fragment-3">Three</a></li>
24 </ul>
25 <div id="fragment-1">
26 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
27 </div>
28 <div id="fragment-2">
29 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
30 </div>
31 <div id="fragment-3">
32 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
33 </div>
34 </div>
35 ]]></code></pre>
36
675a0b0 @scottgonzalez Tabs: Added keyboard interaction notes.
scottgonzalez authored
37 <h3>Keyboard interaction</h3>
38
39 <p>When focus is on a tab, the following key commands are available:</p>
40 <ul>
b0000c6 @scottgonzalez All: Normalize keyboard interaction markup
scottgonzalez authored
41 <li><code>UP</code>/<code>LEFT</code>: Move focus to the previous tab. If on first tab, moves focus to last tab. Activate focused tab after a short delay.</li>
42 <li><code>DOWN</code>/<code>RIGHT</code>: Move focus to the next tab. If on last tab, moves focus to first tab. Activate focused tab after a short delay.</li>
80c019d @scottgonzalez Tabs: Document navigation with CTRL key
scottgonzalez authored
43 <li><code>CTRL</code> + <code>UP</code>/<code>LEFT</code>: Move focus to the previous tab. If on first tab, moves focus to last tab. The focused tab must be manually activated.</li>
44 <li><code>CTRL</code> + <code>DOWN</code>/<code>RIGHT</code>: Move focus to the next tab. If on last tab, moves focus to first tab. The focused tab must be manually activated.</li>
b0000c6 @scottgonzalez All: Normalize keyboard interaction markup
scottgonzalez authored
45 <li><code>HOME</code>: Move focus to the first tab. Activate focused tab after a short delay.</li>
46 <li><code>END</code>: Move focus to the last tab. Activate focused tab after a short delay.</li>
80c019d @scottgonzalez Tabs: Document navigation with CTRL key
scottgonzalez authored
47 <li><code>CTRL</code> + <code>HOME</code>: Move focus to the first tab. The focused tab must be manually activated.</li>
48 <li><code>CTRL</code> + <code>END</code>: Move focus to the last tab. The focused tab must be manually activated.</li>
b0000c6 @scottgonzalez All: Normalize keyboard interaction markup
scottgonzalez authored
49 <li><code>SPACE</code>: Activate panel associated with focused tab.</li>
50 <li><code>ENTER</code>: Activate or toggle panel associated with focused tab.</li>
51 <li><code>ALT</code>/<code>OPTION</code> + <code>PAGE UP</code>: Move focus to the previous tab and immediately activate.</li>
52 <li><code>ALT</code>/<code>OPTION</code> + <code>PAGE DOWN</code>: Move focus to the next tab and immediately activate.</li>
675a0b0 @scottgonzalez Tabs: Added keyboard interaction notes.
scottgonzalez authored
53 </ul>
54
55 <p>When focus is in a panel, the following key commands are available:</p>
56 <ul>
b0000c6 @scottgonzalez All: Normalize keyboard interaction markup
scottgonzalez authored
57 <li><code>CTRL</code> + <code>UP</code>: Move focus to associated tab.</li>
58 <li><code>ALT</code>/<code>OPTION</code> + <code>PAGE UP</code>: Move focus to the previous tab and immediately activate.</li>
59 <li><code>ALT</code>/<code>OPTION</code> + <code>PAGE DOWN</code>: Move focus to the next tab and immediately activate.</li>
675a0b0 @scottgonzalez Tabs: Added keyboard interaction notes.
scottgonzalez authored
60 </ul>
9176459 @scottgonzalez Added dependency lists for widgets. Fixes #48.
scottgonzalez authored
61
7a2b894 @tjvantoll Theming: Add theming documentation for individual widgets. Fixes #137.
tjvantoll authored
62 <xi:include href="../includes/widget-theming.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
63
64 <ul>
65 <li>
66 <code>ui-tabs</code>: The outer container of the tabs. This element will additionally have a class of <code>ui-tabs-collapsible</code> when the <a href="#option-collapsible"><code>collapsible</code></a> option is set.
67 <ul>
68 <li>
69 <code>ui-tabs-nav</code>: The list of tabs.
70 <ul>
71 <li>The active list item in the nav will have a <code>ui-tabs-active</code> class. Any list item whose associated content is loading via an Ajax call will have a <code>ui-tabs-loading</code> class.
72 <ul>
73 <li><code>ui-tabs-anchor</code>: The anchors used to switch panels.</li>
74 </ul>
75 </li>
76 </ul>
77 </li>
78 <li><code>ui-tabs-panel</code>: The panels associated with the tabs. Only the panel whose corresponding tab is active will be visible.</li>
79 </ul>
80 </li>
81 </ul>
82
9176459 @scottgonzalez Added dependency lists for widgets. Fixes #48.
scottgonzalez authored
83 <h3>Dependencies</h3>
84 <ul>
85 <li><a href="/category/ui-core/">UI Core</a></li>
86 <li><a href="/jQuery.widget/">Widget Factory</a></li>
87 <li><a href="/category/effects-core/">Effects Core</a> (optional; for use with the <a href="#option-show"><code>show</code></a> and <a href="#option-hide"><code>hide</code></a> options)</li>
88 </ul>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
89 </longdesc>
21606fa @scottgonzalez Moved functional CSS comment into resuable note.
scottgonzalez authored
90 <note id="functional-css"/>
24e33d1 @scottgonzalez Change <created> to <added> and display in output. Fixes #33.
scottgonzalez authored
91 <added>1.0</added>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
92 <options>
07529f7 @jzaefferer Tabs: Added option examples.
jzaefferer authored
93 <option name="active" default="0" example-value="1">
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid anywa...
jzaefferer authored
94 <desc>
e0a39e0 @scottgonzalez Tabs: Updated docs.
scottgonzalez authored
95 Which panel is currently open.
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid anywa...
jzaefferer authored
96 </desc>
e0a39e0 @scottgonzalez Tabs: Updated docs.
scottgonzalez authored
97 <type name="Boolean">
98 <desc>Setting <code>active</code> to <code>false</code> will collapse all panels. This requires the <a href="#option-collapsible"><code>collapsible</code></a> option to be <code>true</code>.</desc>
99 </type>
100 <type name="Integer">
101 <desc>The zero-based index of the panel that is active (open). A negative value selects panels going backward from the last panel.</desc>
102 </type>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
103 </option>
07529f7 @jzaefferer Tabs: Added option examples.
jzaefferer authored
104 <option name="collapsible" type="Boolean" default="false" example-value="true">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
105 <desc>When set to <code>true</code>, the active panel can be closed.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
106 </option>
07529f7 @jzaefferer Tabs: Added option examples.
jzaefferer authored
107 <option name="disabled" default="false" example-value="[ 0, 2 ]">
108 <desc>Which tabs are disabled.</desc>
e0a39e0 @scottgonzalez Tabs: Updated docs.
scottgonzalez authored
109 <type name="Boolean">
110 <desc>Enable or disable all tabs.</desc>
111 </type>
112 <type name="Array">
113 <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>
114 </type>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
115 </option>
07529f7 @jzaefferer Tabs: Added option examples.
jzaefferer authored
116 <option name="event" type="String" default='"click"' example-value='"mouseover"'>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
117 <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>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
118 </option>
07529f7 @jzaefferer Tabs: Added option examples.
jzaefferer authored
119 <option name="heightStyle" type="String" default='"content"' example-value='"fill"'>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid anywa...
jzaefferer authored
120 <desc>
121 Controls the height of the tabs widget and each panel. Possible values:
122 <ul>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
123 <li><code>"auto"</code>: All panels will be set to the height of the tallest panel.</li>
124 <li><code>"fill"</code>: Expand to the available height based on the tabs' parent height.</li>
125 <li><code>"content"</code>: Each panel will be only as tall as its content.</li>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid anywa...
jzaefferer authored
126 </ul>
127 </desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
128 </option>
8d47e08 @scottgonzalez Made hide and show options into includes.
scottgonzalez authored
129 <xi:include href="../includes/widget-option-hide.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
130 <xi:include href="../includes/widget-option-show.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
131 </options>
132 <events>
f6592f3 @scottgonzalez Removed widget event types, added event prefixes.
scottgonzalez authored
133 <event name="activate">
72b1e41 @tjvantoll Accordion / Tabs: Document that the activate event is not fired on creat...
tjvantoll authored
134 <desc>
135 <p>Triggered after a tab has been activated (after animation completes). If the tabs were previously collapsed, <code>ui.oldTab</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the tabs are collapsing, <code>ui.newTab</code> and <code>ui.newPanel</code> will be empty jQuery objects.</p>
136 <div class="warning"><strong>Note:</strong> Since the <code>activate</code> event is only fired on tab activation, it is not fired for the initial tab when the tabs widget is created. If you need a hook for widget creation use the <a href="#event-create"><code>create</code></a> event.</div>
137 </desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
138 <argument name="event" type="Event"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
139 <argument name="ui" type="Object">
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
140 <property name="newTab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
141 <desc>The tab that was just activated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
142 </property>
143 <property name="oldTab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
144 <desc>The tab that was just deactivated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
145 </property>
146 <property name="newPanel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
147 <desc>The panel that was just activated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
148 </property>
149 <property name="oldPanel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
150 <desc>The panel that was just deactivated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
151 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
152 </argument>
153 </event>
f6592f3 @scottgonzalez Removed widget event types, added event prefixes.
scottgonzalez authored
154 <event name="beforeActivate">
77386ca @scottgonzalez Tabs: Fixed description of beforeActivate event timing.
scottgonzalez authored
155 <desc>Triggered immediately before a tab is activated. Can be canceled to prevent the tab from activating. If the tabs are currently collapsed, <code>ui.oldTab</code> and <code>ui.oldPanel</code> will be empty jQuery objects. If the tabs are collapsing, <code>ui.newTab</code> and <code>ui.newPanel</code> will be empty jQuery objects.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
156 <argument name="event" type="Event"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
157 <argument name="ui" type="Object">
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
158 <property name="newTab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
159 <desc>The tab that is about to be activated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
160 </property>
161 <property name="oldTab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
162 <desc>The tab that is about to be deactivated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
163 </property>
164 <property name="newPanel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
165 <desc>The panel that is about to be activated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
166 </property>
167 <property name="oldPanel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
168 <desc>The panel that is about to be deactivated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
169 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
170 </argument>
171 </event>
f6592f3 @scottgonzalez Removed widget event types, added event prefixes.
scottgonzalez authored
172 <event name="beforeLoad">
2ae023a @scottgonzalez Tabs: Added note about restrictions on changing ajaxSettings inside befo...
scottgonzalez authored
173 <desc>
174 <p>Triggered when a remote tab is about to be loaded, after the <a href="#event-beforeActivate"><code>beforeActivate</code></a> event. Can be canceled to prevent the tab panel from loading content; though the panel will still be activated. This event is triggered just before the Ajax request is made, so modifications can be made to <code>ui.jqXHR</code> and <code>ui.ajaxSettings</code>.</p>
4c90f52 @jzaefferer Entries: Use "properties" when referring to individual options
jzaefferer authored
175 <p><em>Note: Although <code>ui.ajaxSettings</code> is provided and can be modified, some of these properties have already been processed by jQuery. For example, <a href="//api.jquery.com/jQuery.ajaxPrefilter/">prefilters</a> have been applied, <code>data</code> has been processed, and <code>type</code> has been determined. The <code>beforeLoad</code> event occurs at the same time, and therefore has the same restrictions, as the <code>beforeSend</code> callback from <a href="//api.jquery.com/jQuery.ajax/"><code>jQuery.ajax()</code></a>.</em></p>
2ae023a @scottgonzalez Tabs: Added note about restrictions on changing ajaxSettings inside befo...
scottgonzalez authored
176 </desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
177 <argument name="event" type="Event"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
178 <argument name="ui" type="Object">
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
179 <property name="tab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
180 <desc>The tab that is being loaded.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
181 </property>
182 <property name="panel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
183 <desc>The panel which will be populated by the Ajax response.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
184 </property>
ad0daab @scottgonzalez Tabs: Improved event documentation.
scottgonzalez authored
185 <property name="jqXHR" type="jqXHR">
186 <desc>The <code>jqXHR</code> object that is requesting the content.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
187 </property>
188 <property name="ajaxSettings" type="Object">
4c90f52 @jzaefferer Entries: Use "properties" when referring to individual options
jzaefferer authored
189 <desc>The properties that will be used by <a href="//api.jquery.com/jQuery.ajax/"><code>jQuery.ajax</code></a> to request the content.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
190 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
191 </argument>
192 </event>
ad0daab @scottgonzalez Tabs: Improved event documentation.
scottgonzalez authored
193 <event name="create">
194 <desc>Triggered when the tabs are created. If the tabs are collapsed, <code>ui.tab</code> and <code>ui.panel</code> will be empty jQuery objects.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
195 <argument name="event" type="Event"/>
ad0daab @scottgonzalez Tabs: Improved event documentation.
scottgonzalez authored
196 <argument name="ui" type="Object">
197 <property name="tab" type="jQuery">
198 <desc>The active tab.</desc>
199 </property>
200 <property name="panel" type="jQuery">
201 <desc>The active panel.</desc>
202 </property>
203 </argument>
204 </event>
f6592f3 @scottgonzalez Removed widget event types, added event prefixes.
scottgonzalez authored
205 <event name="load">
7dbf536 @jzaefferer Tabs: Update events to 1.9 API
jzaefferer authored
206 <desc>Triggered after a remote tab has been loaded.</desc>
3e236c2 @scottgonzalez Cleaned up events.
scottgonzalez authored
207 <argument name="event" type="Event"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
208 <argument name="ui" type="Object">
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
209 <property name="tab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
210 <desc>The tab that was just loaded.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
211 </property>
212 <property name="panel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
213 <desc>The panel which was just populated by the Ajax response.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
214 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
215 </argument>
216 </event>
217 </events>
218 <methods>
c6ac15f @scottgonzalez Updated widget factory and base widget docs.
scottgonzalez authored
219 <xi:include href="../includes/widget-method-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
220 <method name="disable">
35bec54 @scottgonzalez Tabs: Don't duplicate <method>s with the same name.
scottgonzalez authored
221 <signature>
222 <desc>Disables all tabs.</desc>
223 </signature>
a53d243 @scottgonzalez Tabs: Fix signatures for methods that take an index or href
scottgonzalez authored
224 <signature example-params="1">
35bec54 @scottgonzalez Tabs: Don't duplicate <method>s with the same name.
scottgonzalez authored
225 <desc>
226 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>.
227 </desc>
a53d243 @scottgonzalez Tabs: Fix signatures for methods that take an index or href
scottgonzalez authored
228 <argument name="index" type="Number">
229 <desc>The zero-based index of the tab to disable.</desc>
230 </argument>
231 </signature>
232 <signature example-params='"#foo"'>
233 <desc>
234 Disables a tab. The selected tab cannot be disabled.
235 </desc>
236 <argument name="href" type="String">
237 <desc>The <code>href</code> of the tab to disable.</desc>
35bec54 @scottgonzalez Tabs: Don't duplicate <method>s with the same name.
scottgonzalez authored
238 </argument>
239 </signature>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
240 </method>
6b2fe03 @jzaefferer Add disable/enable/option/widget methods
jzaefferer authored
241 <method name="enable">
35bec54 @scottgonzalez Tabs: Don't duplicate <method>s with the same name.
scottgonzalez authored
242 <signature>
243 <desc>Enables all tabs.</desc>
244 </signature>
a53d243 @scottgonzalez Tabs: Fix signatures for methods that take an index or href
scottgonzalez authored
245 <signature example-params="1">
35bec54 @scottgonzalez Tabs: Don't duplicate <method>s with the same name.
scottgonzalez authored
246 <desc>Enables a tab. To enable more than one tab at once reset the disabled property like: <code>$( "#example" ).tabs( "option", "disabled", [] );</code>.</desc>
a53d243 @scottgonzalez Tabs: Fix signatures for methods that take an index or href
scottgonzalez authored
247 <argument name="index" type="Number">
248 <desc>The zero-based index of the tab to enable.</desc>
249 </argument>
250 </signature>
251 <signature example-params='"#foo"'>
252 <desc>Enables a tab.</desc>
253 <argument name="href" type="String">
254 <desc>The <code>href</code> of the tab to enable.</desc>
35bec54 @scottgonzalez Tabs: Don't duplicate <method>s with the same name.
scottgonzalez authored
255 </argument>
256 </signature>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
257 </method>
a53d243 @scottgonzalez Tabs: Fix signatures for methods that take an index or href
scottgonzalez authored
258 <method name="load">
259 <signature example-params="1">
260 <desc>Loads the panel content of a remote tab.</desc>
261 <argument name="index" type="Number">
e0a39e0 @scottgonzalez Tabs: Updated docs.
scottgonzalez authored
262 <desc>The zero-based index of the tab to load.</desc>
a53d243 @scottgonzalez Tabs: Fix signatures for methods that take an index or href
scottgonzalez authored
263 </argument>
264 </signature>
265 <signature example-params='"#foo"'>
266 <desc>Loads the panel content of a remote tab.</desc>
267 <argument name="href" type="String">
e0a39e0 @scottgonzalez Tabs: Updated docs.
scottgonzalez authored
268 <desc>The <code>href</code> of the tab to load.</desc>
a53d243 @scottgonzalez Tabs: Fix signatures for methods that take an index or href
scottgonzalez authored
269 </argument>
270 </signature>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
271 </method>
4bb2f69 @scottgonzalez jQuery.widget: Document 1.11's instance method for all widgets
scottgonzalez authored
272 <xi:include href="../includes/widget-method-instance.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
6c710f7 @scottgonzalez Renamed inherits to includes.
scottgonzalez authored
273 <xi:include href="../includes/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
2438639 @scottgonzalez Tabs: Added refresh() method.
scottgonzalez authored
274 <method name="refresh">
275 <desc>Process any tabs that were added or removed directly in the DOM and recompute the height of the tab panels. Results depend on the content and the <a href="#option-heightStyle"><code>heightStyle</code></a> option.</desc>
276 </method>
c6ac15f @scottgonzalez Updated widget factory and base widget docs.
scottgonzalez authored
277 <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
278 </methods>
3317e13 @scottgonzalez Tabs: Document _getList() extension point
scottgonzalez authored
279 <extension-points>
5a631a8 @scottgonzalez Tabs: Fix return type for _getList()
scottgonzalez authored
280 <method name="_getList" return="jQuery">
3317e13 @scottgonzalez Tabs: Document _getList() extension point
scottgonzalez authored
281 <desc>Determine which list should be converted to tabs. By default the first descendant list is used.</desc>
282 <example>
283 <desc>Use the list with the class <code>my-tabs</code> or fall back to the default implementation.</desc>
284 <code><![CDATA[
285 _getList: function() {
286 var list = this.element.find( ".my-tabs" );
287 return list.length ? list.eq( 0 ) : this._super();
288 }
289 ]]></code>
290 </example>
291 </method>
292 </extension-points>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
293 <example>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
294 <desc>A simple jQuery UI Tabs</desc>
295 <code><![CDATA[
296 $( "#tabs" ).tabs();
297 ]]></code>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
298 <html><![CDATA[
299 <div id="tabs">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
300 <ul>
301 <li><a href="#fragment-1"><span>One</span></a></li>
302 <li><a href="#fragment-2"><span>Two</span></a></li>
303 <li><a href="#fragment-3"><span>Three</span></a></li>
304 </ul>
305 <div id="fragment-1">
306 <p>First tab is active by default:</p>
307 <pre><code>$( "#tabs" ).tabs(); </code></pre>
308 </div>
309 <div id="fragment-2">
310 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
311 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
312 </div>
313 <div id="fragment-3">
314 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
315 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
316 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
317 </div>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
318 </div>
319 ]]></html>
320 </example>
80ecaf4 @rdworth Fixed entries2html based on the one in api.jquery.com to put the script ...
rdworth authored
321 <category slug="widgets"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
322 </entry>
Something went wrong with that request. Please try again.