Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 192 lines (189 sloc) 9.33 kB
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
1 <?xml version="1.0"?>
22fafb3 @rdworth Fixed relative urls of xslt
rdworth authored
2 <?xml-stylesheet type="text/xsl" href="../entries2html.xsl" ?>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
3 <entry name="tabs" namespace="fn" type="Widget" widgetnamespace="ui">
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 an…
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>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
7
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
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>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
9
0add1d7 @jzaefferer Add note about functional CSS to all widgets and two interactions. Al…
jzaefferer authored
10 <p>This widget requires some functional CSS, otherwise it won't work. If you build a custom theme, use the widget's specific CSS file as a starting point.</p>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
11 </longdesc>
12 <created>1.0</created>
13 <options>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
14 <option name="active" default="0">
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
jzaefferer authored
15 <desc>
16 The zero-based index of the panel that is active (open). A negative value select panels going backward from the last panel.
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
17 <p>When the <a href="#option-collapsible"><code>collapsible</code></a> option is set to <code>true</code>, a value of <code>false</code> closes all panels; otherwise nothing happens.</p>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
jzaefferer authored
18 </desc>
19 <type name="Boolean" />
20 <type name="Number" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
21 </option>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
22 <option name="collapsible" default="false">
23 <desc>When set to <code>true</code>, the active panel can be closed.</desc>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
jzaefferer authored
24 <type name="Boolean" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
25 </option>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
26 <option name="disabled" default="false">
27 <desc>When set to <code>true</code> or <code>false</code>, all panels will be disabled or enabled, respectively. Can also be set to an array containing the indexes of the tabs (zero-based) that should be disabled, e.g., <code>[ 0, 2 ]</code> would disable the first and third tab.</desc>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
jzaefferer authored
28 <type name="Boolean" />
29 <type name="Array" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
30 </option>
31 <option name="event" type="String" default='"click"'>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
32 <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>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
jzaefferer authored
33 <type name="String" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
34 </option>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
35 <option name="heightStyle" default='"auto"'>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
jzaefferer authored
36 <desc>
37 Controls the height of the tabs widget and each panel. Possible values:
38 <ul>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
39 <li><code>"auto"</code>: All panels will be set to the height of the tallest panel.</li>
40 <li><code>"fill"</code>: Expand to the available height based on the tabs' parent height.</li>
41 <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 an…
jzaefferer authored
42 </ul>
43 </desc>
44 <type name="String" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
45 </option>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
jzaefferer authored
46 <option name="hide" default="true">
47 <desc>How to hide a panel.</desc>
48 <type name="Boolean" />
49 <type name="Object" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
50 </option>
0acbbf4 @jzaefferer Tabs: Cleanup description, removing the pseudo-FAQ (mostly invalid an…
jzaefferer authored
51 <option name="show" default="true">
52 <desc>How to show a panel.</desc>
53 <type name="Boolean" />
54 <type name="Object" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
55 </option>
56 </options>
57 <events>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
58 <event name="activate" type="accordionactivate">
59 <desc>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.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
60 <argument name="event" type="Event">
61 </argument>
62 <argument name="ui" type="Object">
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
63 <property name="newTab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
64 <desc>The tab that was just activated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
65 </property>
66 <property name="oldTab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
67 <desc>The tab that was just deactivated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
68 </property>
69 <property name="newPanel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
70 <desc>The panel that was just activated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
71 </property>
72 <property name="oldPanel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
73 <desc>The panel that was just deactivated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
74 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
75 </argument>
76 </event>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
77 <event name="beforeActivate" type="accordionbeforeactivate">
78 <desc>Triggered directly after 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>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
79 <argument name="event" type="Event">
80 </argument>
81 <argument name="ui" type="Object">
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
82 <property name="newTab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
83 <desc>The tab that is about to be activated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
84 </property>
85 <property name="oldTab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
86 <desc>The tab that is about to be deactivated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
87 </property>
88 <property name="newPanel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
89 <desc>The panel that is about to be activated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
90 </property>
91 <property name="oldPanel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
92 <desc>The panel that is about to be deactivated.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
93 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
94 </argument>
95 </event>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
96 <widget-inherit id="widget-create" />
7dbf536 @jzaefferer Tabs: Update events to 1.9 API
jzaefferer authored
97 <event name="beforeLoad" type="tabsload">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
98 <desc>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>.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
99 <argument name="event" type="Event">
100 </argument>
101 <argument name="ui" type="Object">
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
102 <property name="tab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
103 <desc>The tab that is being loaded.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
104 </property>
105 <property name="panel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
106 <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
107 </property>
108 <property name="jqXHR" type="Object">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
109 <desc>The jqXHR object that is requesting the content.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
110 </property>
111 <property name="ajaxSettings" type="Object">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
112 <desc>The settings 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
113 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
114 </argument>
115 </event>
7dbf536 @jzaefferer Tabs: Update events to 1.9 API
jzaefferer authored
116 <event name="load" type="tabsload">
117 <desc>Triggered after a remote tab has been loaded.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
118 <argument name="event" type="Event">
119 </argument>
120 <argument name="ui" type="Object">
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
121 <property name="tab" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
122 <desc>The tab that was just loaded.</desc>
5e33f3e @kborchers Added missing ui-event props and some missing events
kborchers authored
123 </property>
124 <property name="panel" type="jQuery">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
125 <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
126 </property>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
127 </argument>
128 </event>
129 </events>
130 <methods>
aa3f0bf @kborchers Move inherited widget methods to include files
kborchers authored
131 <widget-inherit id="widget-destroy" />
132 <widget-inherit id="widget-disable" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
133 <method name="disable">
65d34f9 @jzaefferer Tabs: Update methods to 1.9 API
jzaefferer authored
134 <desc>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
135 Disables a tab. The selected tab cannot be disabled. To disable more than one tab at once use: <code>$( "#tabs" ).tabs( "option", "disabled", [ 1, 2, 3 ] )</code>.
65d34f9 @jzaefferer Tabs: Update methods to 1.9 API
jzaefferer authored
136 </desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
137 <argument name="index" type="Number, String">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
138 <desc>The zero-based index of the tab to be disabled. Instead of an index, the <code>href</code> of the tab may be passed.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
139 </argument>
140 </method>
aa3f0bf @kborchers Move inherited widget methods to include files
kborchers authored
141 <widget-inherit id="widget-enable" />
6b2fe03 @jzaefferer Add disable/enable/option/widget methods
jzaefferer authored
142 <method name="enable">
65d34f9 @jzaefferer Tabs: Update methods to 1.9 API
jzaefferer authored
143 <desc>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
144 Enables a tab. To enable more than one tab at once reset the disabled property like: <code>$( "#example" ).tabs( "option", "disabled", [] );</code>.
65d34f9 @jzaefferer Tabs: Update methods to 1.9 API
jzaefferer authored
145 </desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
146 <argument name="index" type="Number, String">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
147 <desc>The zero-based index of the tab to be enabled. Instead of an index, the <code>href</code> of the tab may be passed.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
148 </argument>
149 </method>
150 <method name="load">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
151 <desc>Loads the panel content of a remote tab.</desc>
65d34f9 @jzaefferer Tabs: Update methods to 1.9 API
jzaefferer authored
152 <argument name="index" type="Number, String">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
153 <desc>The zero-baesd index of the tab the be loaded. Instead of an index, the <code>href</code> of the tab may be passed.</desc>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
154 </argument>
155 </method>
3a1eb84 @kborchers Update the widget option method signature files' names to be more des…
kborchers authored
156 <widget-inherit id="widget-get-options" />
157 <widget-inherit id="widget-get-option" />
158 <widget-inherit id="widget-set-option" />
159 <widget-inherit id="widget-set-options" />
aa3f0bf @kborchers Move inherited widget methods to include files
kborchers authored
160 <widget-inherit id="widget-widget" />
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
161 </methods>
162 <example>
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
163 <desc>A simple jQuery UI Tabs</desc>
164 <code><![CDATA[
165 $( "#tabs" ).tabs();
166 ]]></code>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
167 <html><![CDATA[
168 <div id="tabs">
f2a0b66 @scottgonzalez Tabs: Cleanup.
scottgonzalez authored
169 <ul>
170 <li><a href="#fragment-1"><span>One</span></a></li>
171 <li><a href="#fragment-2"><span>Two</span></a></li>
172 <li><a href="#fragment-3"><span>Three</span></a></li>
173 </ul>
174 <div id="fragment-1">
175 <p>First tab is active by default:</p>
176 <pre><code>$( "#tabs" ).tabs(); </code></pre>
177 </div>
178 <div id="fragment-2">
179 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
180 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
181 </div>
182 <div id="fragment-3">
183 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
184 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
185 Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
186 </div>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
187 </div>
188 ]]></html>
189 </example>
80ecaf4 @rdworth Fixed entries2html based on the one in api.jquery.com to put the scri…
rdworth authored
190 <category slug="widgets"/>
f1b270b @rdworth Initial import from jquery-docs repo. New home :)
rdworth authored
191 </entry>
Something went wrong with that request. Please try again.