Tizen 2.0 Release
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / docs / content / content-collapsible-set-options.html
1 <!DOCTYPE html> 
2 <html>
3         <head>
4         <meta charset="utf-8">
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"/>
9
10         <script src="../../js/jquery.js"></script>
11         <script src="../../docs/_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13
14 </head> 
15 <body> 
16
17         <div data-role="page" class="type-interior">
18
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 -->
24
25         <div data-role="content">
26                 <div class="content-primary">
27                 <h2>Collapsible sets</h2>
28                 
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>
34                         </ul>
35
36                         <p>The collapsibleset plugin has the following options:</p>
37
38                 <dl>
39                         <dt><code>collapsedIcon</code> <em>string</em></dt>
40                         <dd>
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>
45 });
46 </code></pre>
47                                 <p>This option is also exposed as a data attribute: <code>data-collapsed-icon=&quot;arrow-r&quot;</code>.</p>
48                         </dd>
49
50                         <dt><code>expandedIcon</code> <em>string</em></dt>
51                         <dd>
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>
56 });
57 </code></pre>
58                                 <p>This option is also exposed as a data attribute: <code>data-expanded-icon=&quot;arrow-d&quot;</code>.</p>
59                         </dd>
60
61                         <dt><code>iconpos</code> <em>string</em></dt>
62                         <dd>
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>
67 });
68 </code></pre>
69                                 <p>This option is also exposed as a data attribute: <code>data-iconpos=&quot;right&quot;</code>.</p>
70                         </dd>
71
72                         <dt><code>initSelector</code> <em>CSS selector string</em></dt>
73                         <dd>
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>
78 });
79 </code></pre>
80                         </dd>
81
82                         <dt><code>inset</code> <em>boolean</em></dt>
83                         <dd>
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>
88 });
89 </code></pre>
90                                 <p>This option is also exposed as a data attribute: <code>data-inset=&quot;false&quot;</code>.</p>
91                         </dd>
92                         
93                         <dt><code>mini</code> <em>boolean</em></dt>
94                         <dd>
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>
99 });
100 </code></pre>
101                                 <p>This option is also exposed as a data attribute: <code>data-mini=&quot;true&quot;</code>.</p>
102                         </dd>
103                         <dt><code>theme</code> <em>string</em></dt>
104                         <dd>
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>
109 });
110 </code></pre>
111                                 <p>This option is also exposed as a data attribute: <code>data-theme=&quot;a&quot;</code>.</p>
112                         </dd>
113
114                 </dl>
115         </div><!--/content-primary -->          
116         
117         <div class="content-secondary">
118                 
119                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
120                         
121                                 <h3>More in this section</h3>
122                                 
123                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
124                                 
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>
131         
132                                 </ul>
133                 </div>
134         </div>
135
136 </div><!-- /content -->
137
138 <div data-role="footer" class="footer-docs" data-theme="c">
139                 <p class="jqm-version"></p>
140                 <p>&copy; 2012 jQuery Foundation and other contributors</p>
141 </div>
142         
143 </div><!-- /page -->
144
145 </body>
146 </html>