You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/content-collapsible-options.html
+16-5Lines changed: 16 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -38,13 +38,13 @@ <h2>Collapsible content</h2>
38
38
<dl>
39
39
<dt><code>collapsed</code><em>boolean</em></dt>
40
40
<dd>
41
-
<pclass="default">default: false</p>
42
-
<p>When true, the container is initially collapsed with a plus icon. To set the value for all instances of this widget, bind this option to the <ahref="../../api/globalconfig.html">mobileinit event</a>:</p>
41
+
<pclass="default">default: true</p>
42
+
<p>When false, the container is initially expanded with a minus icon in the header. To set the value for all instances of this widget, bind this option to the <ahref="../../api/globalconfig.html">mobileinit event</a>:</p>
<p>This option is also exposed as a data attribute: <code>data-iconpos="right"</code>.</p>
100
+
</dd>
101
+
91
102
<!--
92
103
<dt><code>iconTheme</code> <em>string</em></dt>
93
104
<dd>
@@ -114,7 +125,7 @@ <h2>Collapsible content</h2>
114
125
<dt><code>mini</code><em>boolean</em></dt>
115
126
<dd>
116
127
<pclass="default">default: false</p>
117
-
<p>Sets the size of the element to a more compact, <ahref="../forms/forms-all-mini.html">mini version</a>. To set the value for all instances of this widget, bind this option to the <ahref="../../api/globalconfig.html">mobileinit event</a>:</p>
128
+
<p>Sets the size of the element to a more compact, <ahref="../forms/forms-all-mini.html">mini version</a>. If the value is false for an individual collapsible container, but that container is part of a collapsible set, then the value is inherited from the parent collapsible set. To set the value for all instances of this widget, bind this option to the <ahref="../../api/globalconfig.html">mobileinit event</a>:</p>
<p>Bind events directly to the set container, typically a <code>div</code> element. Use jQuery Mobile's <ahref="../api/events.html">virtual events</a>, or bind standard JavaScript events, like change, focus, blur, etc.:</p>
<p>The collapsible set plugin has the following method:</p>
37
+
38
+
<dl>
39
+
<dt><code>refresh</code> update the collapsible set</dt>
40
+
<dd>
41
+
<p>If you manipulate a collapsible set via JavaScript (e.g. add new collapsible containers), you must call the refresh method on it to update the visual styling.</p>
<p>This is used to define the selectors (element types, data roles, etc.) that will automatically be initialized as collapsible sets. To change which elements are initialized, bind this option to the <ahref="../../api/globalconfig.html">mobileinit event</a>:</p>
<p>Sets the size of the element to a more compact, <ahref="../forms/forms-all-mini.html">mini version</a>. To set the value for all instances of this widget, bind this option to the <ahref="../../api/globalconfig.html">mobileinit event</a>:</p>
<p>This option is also exposed as a data attribute: <code>data-mini="true"</code>.</p>
69
+
</dd>
70
+
<dt><code>theme</code><em>string</em></dt>
71
+
<dd>
72
+
<pclass="default">default: null, inherited from parent</p>
73
+
<p>Sets the color scheme (swatch) for the collapsible set. It accepts a single letter from a-z that maps to the swatches included in your theme. To set the value for all instances of this widget, bind this option to the <ahref="../../api/globalconfig.html">mobileinit event</a>:</p>
<p>Collapsible sets start with the exact same markup as <ahref="content-collapsible.html">individual collapsibles</a>. By adding a parent wrapper with a <code> data-role="collapsible-set"</code> attribute around a number of collapsibles, the framework will style these to looks like a visually grouped widget and make it behave like an accordion so only one section can be open at a time. View the <ahref="../api/data-attributes.html">data- attribute reference</a> to see all the possible attributes you can add to collapsible sets.</p>
30
37
<p>By default, all the sections will be collapsed. To set a section to be open when the page loads, add the <code> data-collapsed="false"</code> attribute to the heading of the section you want expanded.</p>
0 commit comments