5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>jQuery Mobile Docs - Collapsible Sets</title>
7 <link rel="stylesheet" href="../../css/themes/default/jquery.mobile.css" />
8 <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
10 <script src="../../js/jquery.js"></script>
11 <script src="../../docs/_assets/js/jqm-docs.js"></script>
12 <script src="../../js/"></script>
17 <div data-role="page" class="type-interior">
19 <div data-role="header" data-theme="f">
20 <h1>Collapsible set</h1>
21 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
22 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
23 </div><!-- /header -->
25 <div data-role="content">
26 <div class="content-primary">
27 <h2>Collapsible sets</h2>
29 <ul data-role="controlgroup" data-type="horizontal" class="localnav">
30 <li><a href="content-collapsible-set.html" data-role="button" data-transition="fade">Basics</a></li>
31 <li><a href="content-collapsible-set-options.html" data-role="button" data-transition="fade" class="ui-btn-active">Options</a></li>
32 <li><a href="content-collapsible-set-methods.html" data-role="button" data-transition="fade">Methods</a></li>
33 <li><a href="content-collapsible-set-events.html" data-role="button" data-transition="fade">Events</a></li>
36 <p>The collapsibleset plugin has the following options:</p>
39 <dt><code>collapsedIcon</code> <em>string</em></dt>
41 <p class="default">default: "plus"</p>
42 <p>Sets the icon for the headers of the collapsible containers when in a collapsed state. To set the value for all instances of this widget, bind this option to the <a href="../../api/globalconfig.html">mobileinit event</a>:</p>
43 <pre><code>$( document ).bind( "mobileinit", function(){
44 <strong>$.mobile.collapsibleset.prototype.options.collapsedIcon = "arrow-r";</strong>
47 <p>This option is also exposed as a data attribute: <code>data-collapsed-icon="arrow-r"</code>.</p>
50 <dt><code>expandedIcon</code> <em>string</em></dt>
52 <p class="default">default: "minus"</p>
53 <p>Sets the icon for the headers of the collapsible containers when in an expanded state. To set the value for all instances of this widget, bind this option to the <a href="../../api/globalconfig.html">mobileinit event</a>:</p>
54 <pre><code>$( document ).bind( "mobileinit", function(){
55 <strong>$.mobile.collapsibleset.prototype.options.expandedIcon = "arrow-d";</strong>
58 <p>This option is also exposed as a data attribute: <code>data-expanded-icon="arrow-d"</code>.</p>
61 <dt><code>iconpos</code> <em>string</em></dt>
63 <p class="default">default: "left"</p>
64 <p>Positions the icons in the collapsible headers. Possible values: left, right, top, bottom, none, notext.</p>
65 <pre><code>$( document ).bind( "mobileinit", function(){
66 <strong>$.mobile.collapsibleset.prototype.options.iconpos = "right";</strong>
69 <p>This option is also exposed as a data attribute: <code>data-iconpos="right"</code>.</p>
72 <dt><code>initSelector</code> <em>CSS selector string</em></dt>
74 <p class="default">default: ":jqmData(role='collapsible-set')"</p>
75 <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 <a href="../../api/globalconfig.html">mobileinit event</a>:</p>
76 <pre><code>$( document ).bind( "mobileinit", function(){
77 <strong>$.mobile.collapsibleset.prototype.options.initSelector = ".mycollapsibleset";</strong>
82 <dt><code>inset</code> <em>boolean</em></dt>
84 <p class="default">default: true</p>
85 <p>By setting this option to false the collapsibles will get a full width appearance without corners. 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 <a href="../../api/globalconfig.html">mobileinit event</a>:</p>
86 <pre><code>$( document ).bind( "mobileinit", function(){
87 <strong>$.mobile.collapsible.prototype.options.inset = false;</strong>
90 <p>This option is also exposed as a data attribute: <code>data-inset="false"</code>.</p>
93 <dt><code>mini</code> <em>boolean</em></dt>
95 <p class="default">default: false</p>
96 <p>Sets the size of the collapsibles to a more compact, <a href="../forms/forms-all-mini.html">mini version</a>. To set the value for all instances of this widget, bind this option to the <a href="../../api/globalconfig.html">mobileinit event</a>:</p>
97 <pre><code>$( document ).bind( "mobileinit", function(){
98 <strong>$.mobile.collapsibleset.prototype.options.mini = true;</strong>
101 <p>This option is also exposed as a data attribute: <code>data-mini="true"</code>.</p>
103 <dt><code>theme</code> <em>string</em></dt>
105 <p class="default">default: null, inherited from parent</p>
106 <p>Sets the color scheme (swatch) for the collapsible set. It accepts a single letter from a-z that maps to one of the swatches included in your theme. To set the value for all instances of this widget, bind this option to the <a href="../../api/globalconfig.html">mobileinit event</a>:</p>
107 <pre><code>$( document ).bind( "mobileinit", function(){
108 <strong>$.mobile.collapsibleset.prototype.options.theme = "a";</strong>
111 <p>This option is also exposed as a data attribute: <code>data-theme="a"</code>.</p>
115 </div><!--/content-primary -->
117 <div class="content-secondary">
119 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
121 <h3>More in this section</h3>
123 <ul data-role="listview" data-theme="c" data-dividertheme="d">
125 <li data-role="list-divider">Content Formatting</li>
126 <li><a href="content-html.html">Basic HTML styles</a></li>
127 <li><a href="content-grids.html">Layout grids (columns)</a></li>
128 <li><a href="content-collapsible.html">Collapsible content blocks</a></li>
129 <li data-theme="a"><a href="content-collapsible-set.html">Collapsible sets (accordions)</a></li>
130 <li><a href="content-themes.html">Theming content</a></li>
136 </div><!-- /content -->
138 <div data-role="footer" class="footer-docs" data-theme="c">
139 <p class="jqm-version"></p>
140 <p>© 2012 jQuery Foundation and other contributors</p>