Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.0.1pre / docs / lists / lists-themes.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 - Theming Lists</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>Theming lists</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" class="ui-body">
24                 <div class="content-primary">   
25
26                 <p>All the standard button swatches can be applied to lists. The framework assigns a default list theme swatch of &quot;c&quot; (silver in the default theme) and swatch &quot;b&quot; (blue in default theme) for dividers. Below is a default themed list.</p>
27                 
28 <code>
29 &lt;ul data-role=&quot;listview&quot; data-inset=&quot;true&quot;&gt;
30 </code>
31                 <ul data-role="listview" data-inset="true" data-icon="star">
32                         <li data-role="list-divider">Divider</li>
33                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
34                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
35                         <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
36                 </ul>
37                 
38                 <h2>Theming list items</h2>
39                 <p>The list item color scheme can be changed to any button color theme swatch by adding the <code> data-theme</code> attribute to the list, and setting the letter theme swatch. Here is the same list above with the &quot;a&quot; swatch applied. </p>
40                 
41 <code>
42 &lt;ul data-role=&quot;listview&quot; data-inset=&quot;true&quot; data-theme=&quot;d&quot;&gt;
43 </code>
44                 
45                 <ul data-role="listview" data-inset="true" data-theme="d">
46                         <li data-role="list-divider">Divider</li>
47                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
48                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
49                         <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
50                 </ul>
51                 
52                 <p> data-theme attributes also work at the LI-level, for styling a single item.</p>
53                 
54                 <ul data-role="listview" data-inset="true" data-theme="d">
55                         <li data-role="list-divider">Divider</li>
56                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
57                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
58                         <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
59                         <li data-theme="a"><a href="index.html">Trash <span class="ui-li-count">34</span></a></li>
60                 </ul>
61                 
62                 <h2>Theming dividers</h2>
63                 
64                 <p>The theme for <strong>list dividers</strong> can be set by adding the <code>data-divider-theme</code> to the list and specifying a swatch letter. Here is an example of the same list above with swatch &quot;d&quot; set on the dividers.</p>
65                 
66 <code>
67 &lt;ul data-role=&quot;listview&quot; data-inset=&quot;true&quot; data-theme=&quot;d&quot; data-divider-theme=&quot;e&quot;&gt;
68 </code>
69                 
70                 <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e">
71                         <li data-role="list-divider">Divider</li>
72                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
73                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
74                         <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
75                 </ul>
76                 
77                 <h2>Theming count bubbles</h2>
78                 
79                 <p>The theme for <strong>count bubbles</strong> can be set by adding the <code>data-count-theme</code> to the list and specifying a swatch letter. Here is an example with swatch &quot;e&quot; set on the dividers.</p>
80                 
81 <code>
82 &lt;ul data-role=&quot;listview&quot; data-inset=&quot;true&quot; data-theme=&quot;d&quot; data-divider-theme=&quot;e&quot; data-count-theme=&quot;b&quot;&gt;
83 </code>
84                 
85                 <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e" data-count-theme="b">
86                         <li data-role="list-divider">Divider</li>
87                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
88                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
89                         <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
90                 </ul>
91                 
92                 <h2>Theming icons</h2>
93                 
94                 <p>The default icon for each list item is <code>arrow-r</code>. To override this, set the <code> data-icon</code> attribute on the desired list item to the <a href="../buttons/buttons-icons.html">name of a standard icon</a>.  To prevent icons from appearing altogether, set the <code> data-icon</code> attribute to &quot;false&quot;.</p>
95 <pre>
96 <code>
97 &lt;li data-icon=&quot;info&quot;&gt;&lt;a href="#"&gt;Notices&lt;/a&gt;&lt;/li&gt;
98 &lt;li data-icon=&quot;alert&quot;&gt;&lt;a href="#"&gt;Alerts&lt;/a&gt;&lt;/li&gt;
99 &lt;li data-icon=&quot;false&quot;&gt;&lt;a href="#"&gt;No icon&lt;/a&gt;&lt;/li&gt;
100 </code>
101 </pre>
102                 <ul data-role="listview" data-inset="true">
103                         <li data-role="list-divider">Divider</li>
104                         <li data-icon="info"><a href="#">Notices</a></li>
105                         <li data-icon="alert"><a href="#">Alerts</a></li>
106                         <li data-icon="false"><a href="#">No icon</a></li>
107                 </ul>
108         
109                 
110                 <h2>Theming split buttons</h2>
111                 
112                 <p>For split lists which a second button, the framework default to &quot;b&quot; for the theme swatch (blue in the default theme)  Here is a default split list:</p>
113                 
114                 <ul data-role="listview" data-inset="true">
115                         <li><a href="index.html">
116                                 <img src="images/album-bb.jpg" />
117                                 <h3>Broken Bells</h3>
118                                 <p>Broken Bells</p></a>
119                                 <a href="index.html">Purchase album</a>
120                         </li>
121                         <li><a href="index.html">
122                                 <img src="images/album-hc.jpg" />
123                                 <h3>Warning</h3>
124                                 <p>Hot Chip</p></a>
125                                 <a href="index.html">Purchase album</a>
126                         </li>
127                 </ul>
128                 
129 <code>
130 &lt;ul data-role=&quot;listview&quot; data-inset=&quot;true&quot; data-split-theme=&quot;a&quot;&gt;
131 </code>
132                 <p>To specify the color swatch for the icon button on the right, add the <code>data-split-theme</code> to the list and specify a swatch letter. This attribute can also be added to individual split inside list items by adding a <code> data-theme</code> attribute to specific links  (see second list item).</p>
133                 <ul data-role="listview" data-inset="true" data-split-theme="a">
134                         <li><a href="index.html">
135                                 <img src="images/album-bb.jpg" />
136                                 <h3>Broken Bells</h3>
137                                 <p>Broken Bells</p>
138                                 </a>
139                                 <a href="index.html">Purchase album</a>
140                         </li>
141                         <li><a href="index.html">
142                                 <img src="images/album-hc.jpg" />
143                                 <h3>Warning</h3>
144                                 <p>Hot Chip</p>
145                                 </a>
146                                 <a href="index.html" data-theme="e">Purchase album</a>
147                         </li>
148                 </ul>
149
150                 <p>The icon for the split theme can set at the list level by adding the <code>data-split-icon</code> to the list and specifying a <a href="../buttons/buttons-icons.html">standard icon</a>. This attribute can also be added to individual split inside list items by adding a <code> data-icon</code> attribute to specific links (see second list item).</p>
151                 
152 <code>
153 &lt;ul data-role=&quot;listview&quot; data-inset=&quot;true&quot; data-split-theme=&quot;d&quot; data-split-icon=&quot;delete&quot;&gt;
154 </code>
155
156         <ul data-role="listview" data-inset="true" data-split-theme="d" data-split-icon="delete" >
157                 <li><a href="index.html">
158                         <img src="images/album-bb.jpg" />
159                         <h3>Broken Bells</h3>
160                         <p>Broken Bells</p>
161                         </a>
162                         <a href="index.html">Purchase album</a>
163                 </li>
164                 <li><a href="index.html">
165                         <img src="images/album-hc.jpg" />
166                         <h3>Warning</h3>
167                         <p>Hot Chip</p>
168                         </a>
169                         <a href="index.html">Purchase album</a>
170                 </li>
171         </ul>
172
173
174                 
175                 <h2>Examples of all basic list swatches</h2>
176                 
177                 <p><strong>A</strong> swatch</p>
178                 <ul data-role="listview" data-inset="true" data-theme="a">
179                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
180                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
181                         <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
182                 </ul>
183                 
184                 <p><strong>B</strong> swatch</p>
185                 <ul data-role="listview" data-inset="true" data-theme="b">
186                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
187                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
188                         <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
189                 </ul>
190                 
191                 <p><strong>C</strong> swatch</p>
192                 <ul data-role="listview" data-inset="true" data-theme="c">
193                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
194                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
195                         <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
196                 </ul>
197                 
198                 <p><strong>D</strong> swatch</p>
199                 <ul data-role="listview" data-inset="true" data-theme="d">
200                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
201                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
202                         <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
203                 </ul>
204                 
205                 <p><strong>E</strong> swatch</p>
206                 <ul data-role="listview" data-inset="true" data-theme="e">
207                         <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
208                         <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
209                         <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
210                 </ul>
211                 
212                 
213                 </div><!--/content-primary -->          
214
215                 <div class="content-secondary">
216
217                         <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
218
219                                         <h3>More in this section</h3>
220
221                                         <ul data-role="listview" data-theme="c" data-dividertheme="d">
222
223                                                 <li data-role="list-divider">List views</li>
224                                                 <li><a href="docs-lists.html">List markup conventions</a></li>
225                                                 <li><a href="lists-ul.html">Basic linked list</a></li>
226                                                 <li><a href="lists-nested.html">Nested list</a></li>
227                                                 <li><a href="lists-ol.html">Numbered list</a></li>
228
229                                                 <li><a href="lists-split.html">Split button list</a></li>       
230                                                 <li><a href="lists-divider.html">List dividers</a></li>
231                                                 <li><a href="lists-count.html">Count bubble</a></li>
232                                                 <li><a href="lists-thumbnails.html">Thumbnails</a></li>
233                                                 <li><a href="lists-icons.html">Icons</a></li>
234                                                 <li><a href="lists-formatting.html">Content formatting</a></li>
235                                                 <li><a href="lists-search.html">Search filter bar</a></li>
236                                                 <li><a href="lists-search-inset.html">Inset search filter bar</a></li>
237                                                 <li><a href="lists-search-with-dividers.html">Search filter bar with dividers</a></li>
238
239                                                 <li><a href="lists-readonly.html">Read-only lists</a></li>
240                                                 <li><a href="lists-readonly-inset.html">Read-only inset lists</a></li>
241                                                 <li><a href="lists-forms.html">Lists with forms</a></li>
242                                                 <li><a href="lists-forms-inset.html">Inset lists with forms</a></li>
243
244                                                 <li><a href="lists-inset.html">Inset styled lists</a></li>
245                                                 <li><a href="lists-performance.html">List performance test</a></li>
246                                                 <li data-theme="a"><a href="lists-themes.html">Theming lists</a></li>
247
248                                         </ul>
249                         </div>
250                 </div>          
251
252         </div><!-- /content -->
253
254         <div data-role="footer" class="footer-docs" data-theme="c">
255                         <p>&copy; 2011 The jQuery Project</p>
256         </div>
257
258         </div><!-- /page -->
259
260         </body>
261         </html>