Revert "Export"
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.1.0 / docs / forms / slider / 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 - Slider options</title>
7         <link rel="stylesheet"  href="../../../css/themes/default/jquery.mobile.css" />
8         <link rel="stylesheet" href="../../_assets/css/jqm-docs.css"/>
9         <script src="../../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
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>Slider</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
28                 <form action="#" method="get">
29
30                         <h2>Slider</h2>
31                         
32                         <ul data-role="controlgroup" data-type="horizontal" class="localnav">
33                                 <li><a href="index.html" data-role="button" data-transition="fade">Basics</a></li>
34                                 <li><a href="options.html" data-role="button" data-transition="fade" class="ui-btn-active">Options</a></li>
35                                 <li><a href="methods.html" data-role="button" data-transition="fade">Methods</a></li>
36                                 <li><a href="events.html" data-role="button" data-transition="fade">Events</a></li>
37                         </ul>
38                         
39                         <p>The slider plugin has the following options:</p>
40
41                 <dl>
42                         <dt><code>disabled</code> <em>string</em></dt>
43                         <dd>
44                                 <p class="default">default: false</p>
45                                 <p>Sets the default state of the slider to disabled when "true".</p>            
46                                 <pre><code>$('.selector').slider(<strong>{ disabled: "true" }</strong>);</code></pre>
47                         </dd>
48                         
49                         <dt><code>highlight</code> <em>boolean</em></dt>
50                         <dd>
51                                 <p class="default">default: false</p>
52                                 <p>Sets an active state fill on the track from the left edge to the slider handle when set to "true".</p>               
53                                 <pre><code>$('.selector').slider(<strong>{ highlight: "true" }</strong>);</code></pre>
54                         </dd>
55                                         
56                         <dt><code>initSelector</code> <em>CSS selector string</em></dt>
57                         <dd>
58                                 <p class="default">default: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')"</p>
59                                 <p>This is used to define the selectors (element types, data roles, etc.) that will automatically be initialized as sliders. To change which elements are initialized, bind this option to the <a href="../../api/globalconfig.html">mobileinit event</a>:</p>
60 <pre><code>$( document ).bind( "mobileinit", function(){
61    <strong>$.mobile.slider.prototype.options.initSelector = ".myslider";</strong>
62 });
63 </code></pre>
64                         </dd>
65                         
66                         <dt><code>mini</code> <em>boolean</em></dt>
67                         <dd>
68                                 <p class="default">default: false</p>
69                                 <p>Sets the size of the element to a more compact, <a href="../forms-all-mini.html">mini version</a>. This option is also exposed as a data attribute: <code>data-mini=&quot;true&quot;</code></p>              
70                                 <pre><code>$('.selector').slider(<strong>{ mini: "true" }</strong>);</code></pre>
71                         </dd>
72                                                         
73                         <dt><code>theme</code> <em>string</em></dt>
74                         <dd>
75                                 <p class="default">default: null, inherited from parent</p>
76                                 <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 its parent container if not explicitly set. This option is also exposed as a data attribute: <code>data-theme=&quot;a&quot;</code></p>                   
77                                 <pre><code>$('.selector').slider(<strong>{ theme: "a" }</strong>);</code></pre>
78                         </dd>
79                         
80                         <dt><code>trackTheme</code> <em>string</em></dt>
81                         <dd>
82                                 <p class="default">default: null, inherited from parent</p>
83                                 <p>Sets the color scheme (swatch) for the slider's track, specifically. It accepts a single letter from a-z that maps to the swatches included in your theme.</p>               
84                                 <pre><code>$('.selector').slider(<strong>{ trackTheme: "a" }</strong>);</code></pre>
85                                 <p>This option can be overridden in the markup by assigning a data attribute to the input, e.g. <code>data-track-theme=&quot;a&quot;</code>.</p>
86                         </dd>
87                         
88                 </dl>   
89     
90         </form>
91         </div><!--/content-primary -->          
92         
93         <div class="content-secondary">
94                 
95                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
96                         
97                                 <h3>More in this section</h3>
98                                 
99                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
100                                 
101                                         <li data-role="list-divider">Form elements</li>
102                                         <li><a href="../docs-forms.html">Form basics</a></li>
103                                         <li><a href="../forms-all.html">Form element gallery</a></li>
104                                         <li><a href="../forms-all-mini.html">Mini form element gallery</a></li>
105                                         <li><a href="../textinputs/index.html">Text inputs</a></li>
106                                         <li><a href="../search/">Search input</a></li>
107                                         <li data-theme="a"><a href="index.html">Slider</a></li>
108                                         <li><a href="../switch/">Flip toggle switch</a></li>
109                                         <li><a href="../radiobuttons/">Radio buttons</a></li>
110                                         <li><a href="../checkboxes/">Checkboxes</a></li>
111                                         <li><a href="../selects/">Select menus</a></li>
112                                         <li><a href="../forms-themes.html">Theming forms</a></li>
113                                         <li><a href="../forms-all-native.html">Native form elements</a></li>
114                                         <li><a href="../forms-sample.html">Submitting forms</a></li>
115                                         
116         
117                                 </ul>
118                 </div>
119         </div>          
120
121 </div><!-- /content -->
122
123 <div data-role="footer" class="footer-docs" data-theme="c">
124                 <p>&copy; 2011-12 The jQuery Foundation</p>
125 </div>
126         
127 </div><!-- /page -->
128
129 </body>
130 </html>
131