Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / docs / forms / selects / 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 - Select options</title>
7         <link rel="stylesheet"  href="../../../css/themes/default/" />
8         <link rel="stylesheet" href="../../_assets/css/jqm-docs.css"/>
9         <script src="../../../js/jquery.js"></script>
10         <script src="../../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
11         <script src="../../_assets/js/jqm-docs.js"></script>
12         <script src="../../../js/"></script>
13 </head>
14 <body>
15
16         <div data-role="page" class="type-interior">
17
18                 <div data-role="header" data-theme="f">
19                 <h1>Select Menus</h1>
20                 <a href="../../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
21         </div><!-- /header -->
22
23         <div data-role="content">
24                 <div class="content-primary">
25
26                 <form action="#" method="get">
27
28                         <h2>Select menus</h2>
29                         
30                         <ul data-role="controlgroup" data-type="horizontal" class="localnav">
31                                 <li><a href="index.html" data-role="button" data-transition="fade">Basics</a></li>
32                                 <li><a href="options.html" data-role="button" data-transition="fade" class="ui-btn-active">Options</a></li>
33                                 <li><a href="methods.html" data-role="button" data-transition="fade">Methods</a></li>
34                                 <li><a href="events.html" data-role="button" data-transition="fade">Events</a></li>
35                         </ul>
36                         
37                         <p>The select menu plugin has the following options:</p>                        
38                         
39
40                 <dl>
41                         
42                         <dt><code>corners</code> <em>boolean</em></dt>
43                         <dd>
44                                 <p class="default">default: true</p>
45                                 <p>Applies the theme button border-radius to the select button if set to true. This option is also exposed as a data attribute: <code>data-corners=&quot;false&quot;</code></p>
46                                 <pre><code>$('select').selectmenu(<strong>{ corners: "false" }</strong>);</code></pre>
47                         </dd>                   
48                         <dt><code>icon</code> <em>string</em></dt>
49                         <dd>
50                                 <p class="default">default: "arrow-down"</p>
51                                 <p>Applies an icon from the <a href="../../buttons/buttons-icons.html">icon set</a> to the custom button. This option is also exposed as a data attribute: <code>data-icon=&quot;star&quot;</code></p>
52                                 <pre><code>$('select').selectmenu(<strong>{ icon: "star" }</strong>);</code></pre>
53                         </dd>
54                         
55                         <dt><code>iconpos</code> <em>string</em></dt>
56                         <dd>
57                                 <p class="default">default: "right"</p>
58                                 <p>Position of the icon in the select button. Possible values: left, right, none, notext. The notext value will display the select as an icon-only button with no text feedback. This option is also exposed as a data attribute: <code>data-iconpos=&quot;left&quot;</code></p>
59                                 <pre><code>$('select').selectmenu(<strong>{ iconpos: "left" }</strong>);</code></pre>
60                         </dd>
61                         
62                         <dt><code>iconshadow</code> <em>boolean</em></dt>
63                         <dd>
64                                 <p class="default">default: true</p>
65                                 <p>Applies the theme shadow to the select button if set to true. This option is also exposed as a data attribute: <code>data-iconshadow=&quot;false&quot;</code></p>
66                                 <pre><code>$('select').selectmenu(<strong>{ iconshadow: "false" }</strong>);</code></pre>
67                         </dd>
68                         
69                         <dt><code>initSelector</code> <em>CSS selector string</em></dt>
70                         <dd>
71                                 <p class="default">default: "select:not(:jqmData(role='slider'))"</p>
72                                 <p>This is used to define the selectors (element types, data roles, etc.) that will automatically be initialized as select menus. To change which elements are initialized, bind this option to the <a href="../../api/globalconfig.html">mobileinit event</a>:</p>
73                                 <pre><code>$( document ).bind( "mobileinit", function(){
74         <strong>$.mobile.selectmenu.prototype.options.initSelector = ".myselect";</strong>
75 });
76 </code></pre>
77                         </dd>
78                         
79                         <dt><code>inline</code> <em>boolean</em></dt>
80                         <dd>
81                                 <p class="default">default: null (false)</p>
82                                 <p>If set to true, this will make the select button act like an inline button so the width is determined by the button's text. By default, this is null (false) so the select button is full width, regardless of the feedback content. Possible values: true, false. This option is also exposed as a data attribute: <code>data-inline=&quot;true&quot;</code></p>
83                                 <pre><code>$('select').selectmenu(<strong>{ inline: "true" }</strong>);</code></pre>
84                         </dd>
85                         
86                         <dt><code>nativeMenu</code> <em>boolean</em></dt>
87                         <dd>
88                                 <p class="default">default: true</p>
89                                 <p>When set to true, clicking the custom-styled select menu will open the native select menu which is best for performance. If set to false, the custom select menu style will be used instead of the native menu. This option is also exposed as a data attribute: <code>data-native-menu=&quot;false&quot;</code></p>
90                                 <pre><code>$('select').selectmenu(<strong>{ nativeMenu: "false" }</strong>);</code></pre>
91                         </dd>
92                         
93                         <dt><code>shadow</code> <em>boolean</em></dt>
94                         <dd>
95                                 <p class="default">default: true</p>
96                                 <p>Applies the drop shadow style to the select button if set to true. This option is also exposed as a data attribute: <code>data-shadow=&quot;false&quot;</code></p>
97                                 <pre><code>$('select').selectmenu(<strong>{ shadow: "false" }</strong>);</code></pre>
98                         </dd>
99                         
100                         <dt><code>theme</code> <em>string</em></dt>
101                         <dd>
102                                 <p class="default">default: null, inherited from parent</p>
103                                 <p>Sets the color scheme (swatch) for all instances of this widget. It accepts a single letter from a-z that maps to the swatches included in your theme. By default, it will inherit the same swatch color as it's parent container if not explicitly set. This option is also exposed as a data attribute: <code>data-theme=&quot;a&quot;</code></p>                          
104                                 <pre><code>$('select').selectmenu(<strong>{ theme: "a" }</strong>);</code></pre>
105                         </dd>
106                         
107                 </dl>   
108     
109         </form>
110         </div><!--/content-primary -->          
111         
112         <div class="content-secondary">
113                 
114                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
115                         
116                                 <h3>More in this section</h3>
117                                 
118                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
119                                 
120                                         <li data-role="list-divider">Form elements</li>
121                                         <li><a href="../docs-forms.html">Form basics</a></li>
122                                         <li><a href="../forms-all.html">Form element gallery</a></li>
123                                         <li><a href="../textinputs/index.html">Text inputs</a></li>
124                                         <li><a href="../search/">Search input</a></li>
125                                         <li><a href="../slider/">Slider</a></li>
126                                         <li><a href="../switch/">Flip toggle switch</a></li>
127                                         <li><a href="../radiobuttons/">Radio buttons</a></li>
128                                         <li><a href="../checkboxes/">Checkboxes</a></li>
129                                         <li data-theme="a"><a href="index.html">Select menus</a></li>
130                                         <li><a href="../forms-themes.html">Theming forms</a></li>
131                                         <li><a href="../forms-all-native.html">Native form elements</a></li>
132                                         <li><a href="../forms-sample.html">Submitting forms</a></li>
133                                         
134         
135                                 </ul>
136                 </div>
137         </div>          
138
139 </div><!-- /content -->
140
141 <div data-role="footer" class="footer-docs" data-theme="c">
142                 <p>&copy; 2011 The jQuery Project</p>
143 </div>
144         
145 </div><!-- /page -->
146
147 </body>
148 </html>
149