123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>jQuery Mobile Docs - Theming Lists</title>
- <link rel="stylesheet" href="../../jquery.mobile-1.0.1.min.css" />
- <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
- <script src="../../jquery.js"></script>
- <script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
- <script src="../_assets/js/jqm-docs.js"></script>
- <script src="../../jquery.mobile-1.0.1.min.js"></script>
- </head>
- <body>
- <div data-role="page" class="type-interior">
- <div data-role="header" data-theme="f">
- <h1>Theming lists</h1>
- <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
- </div><!-- /header -->
- <div data-role="content" class="ui-body">
- <div class="content-primary">
- <p>All the standard button swatches can be applied to lists. The framework assigns a default list theme swatch of "c" (silver in the default theme) and swatch "b" (blue in default theme) for dividers. Below is a default themed list.</p>
-
- <code>
- <ul data-role="listview" data-inset="true">
- </code>
- <ul data-role="listview" data-inset="true" data-icon="star">
- <li data-role="list-divider">Divider</li>
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
- </ul>
-
- <h2>Theming list items</h2>
- <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 "a" swatch applied. </p>
-
- <code>
- <ul data-role="listview" data-inset="true" data-theme="d">
- </code>
-
- <ul data-role="listview" data-inset="true" data-theme="d">
- <li data-role="list-divider">Divider</li>
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
- </ul>
-
- <p> data-theme attributes also work at the LI-level, for styling a single item.</p>
-
- <ul data-role="listview" data-inset="true" data-theme="d">
- <li data-role="list-divider">Divider</li>
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
- <li data-theme="a"><a href="index.html">Trash <span class="ui-li-count">34</span></a></li>
- </ul>
-
- <h2>Theming dividers</h2>
-
- <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 "d" set on the dividers.</p>
-
- <code>
- <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e">
- </code>
-
- <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e">
- <li data-role="list-divider">Divider</li>
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
- </ul>
-
- <h2>Theming count bubbles</h2>
-
- <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 "e" set on the dividers.</p>
-
- <code>
- <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e" data-count-theme="b">
- </code>
-
- <ul data-role="listview" data-inset="true" data-theme="d" data-divider-theme="e" data-count-theme="b">
- <li data-role="list-divider">Divider</li>
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Sent <span class="ui-li-count">328</span></a></li>
- </ul>
-
- <h2>Theming icons</h2>
-
- <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 "false".</p>
- <pre>
- <code>
- <li data-icon="info"><a href="#">Notices</a></li>
- <li data-icon="alert"><a href="#">Alerts</a></li>
- <li data-icon="false"><a href="#">No icon</a></li>
- </code>
- </pre>
- <ul data-role="listview" data-inset="true">
- <li data-role="list-divider">Divider</li>
- <li data-icon="info"><a href="#">Notices</a></li>
- <li data-icon="alert"><a href="#">Alerts</a></li>
- <li data-icon="false"><a href="#">No icon</a></li>
- </ul>
-
-
- <h2>Theming split buttons</h2>
-
- <p>For split lists which a second button, the framework default to "b" for the theme swatch (blue in the default theme) Here is a default split list:</p>
-
- <ul data-role="listview" data-inset="true">
- <li><a href="index.html">
- <img src="images/album-bb.jpg" />
- <h3>Broken Bells</h3>
- <p>Broken Bells</p></a>
- <a href="index.html">Purchase album</a>
- </li>
- <li><a href="index.html">
- <img src="images/album-hc.jpg" />
- <h3>Warning</h3>
- <p>Hot Chip</p></a>
- <a href="index.html">Purchase album</a>
- </li>
- </ul>
-
- <code>
- <ul data-role="listview" data-inset="true" data-split-theme="a">
- </code>
- <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>
- <ul data-role="listview" data-inset="true" data-split-theme="a">
- <li><a href="index.html">
- <img src="images/album-bb.jpg" />
- <h3>Broken Bells</h3>
- <p>Broken Bells</p>
- </a>
- <a href="index.html">Purchase album</a>
- </li>
- <li><a href="index.html">
- <img src="images/album-hc.jpg" />
- <h3>Warning</h3>
- <p>Hot Chip</p>
- </a>
- <a href="index.html" data-theme="e">Purchase album</a>
- </li>
- </ul>
- <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>
-
- <code>
- <ul data-role="listview" data-inset="true" data-split-theme="d" data-split-icon="delete">
- </code>
- <ul data-role="listview" data-inset="true" data-split-theme="d" data-split-icon="delete" >
- <li><a href="index.html">
- <img src="images/album-bb.jpg" />
- <h3>Broken Bells</h3>
- <p>Broken Bells</p>
- </a>
- <a href="index.html">Purchase album</a>
- </li>
- <li><a href="index.html">
- <img src="images/album-hc.jpg" />
- <h3>Warning</h3>
- <p>Hot Chip</p>
- </a>
- <a href="index.html">Purchase album</a>
- </li>
- </ul>
-
- <h2>Examples of all basic list swatches</h2>
-
- <p><strong>A</strong> swatch</p>
- <ul data-role="listview" data-inset="true" data-theme="a">
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
- </ul>
-
- <p><strong>B</strong> swatch</p>
- <ul data-role="listview" data-inset="true" data-theme="b">
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
- </ul>
-
- <p><strong>C</strong> swatch</p>
- <ul data-role="listview" data-inset="true" data-theme="c">
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
- </ul>
-
- <p><strong>D</strong> swatch</p>
- <ul data-role="listview" data-inset="true" data-theme="d">
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
- </ul>
-
- <p><strong>E</strong> swatch</p>
- <ul data-role="listview" data-inset="true" data-theme="e">
- <li><a href="index.html">Inbox <span class="ui-li-count">12</span></a></li>
- <li><a href="index.html">Outbox <span class="ui-li-count">0</span></a></li>
- <li><a href="index.html">Trash <span class="ui-li-count">62</span></a></li>
- </ul>
-
-
- </div><!--/content-primary -->
- <div class="content-secondary">
- <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
- <h3>More in this section</h3>
- <ul data-role="listview" data-theme="c" data-dividertheme="d">
- <li data-role="list-divider">List views</li>
- <li><a href="docs-lists.html">List markup conventions</a></li>
- <li><a href="lists-ul.html">Basic linked list</a></li>
- <li><a href="lists-nested.html">Nested list</a></li>
- <li><a href="lists-ol.html">Numbered list</a></li>
- <li><a href="lists-split.html">Split button list</a></li>
- <li><a href="lists-divider.html">List dividers</a></li>
- <li><a href="lists-count.html">Count bubble</a></li>
- <li><a href="lists-thumbnails.html">Thumbnails</a></li>
- <li><a href="lists-icons.html">Icons</a></li>
- <li><a href="lists-formatting.html">Content formatting</a></li>
- <li><a href="lists-search.html">Search filter bar</a></li>
- <li><a href="lists-search-inset.html">Inset search filter bar</a></li>
- <li><a href="lists-search-with-dividers.html">Search filter bar with dividers</a></li>
- <li><a href="lists-search-filtertext.html">Search filter hidden data</a></li>
- <li><a href="lists-readonly.html">Read-only lists</a></li>
- <li><a href="lists-readonly-inset.html">Read-only inset lists</a></li>
- <li><a href="lists-forms.html">Lists with forms</a></li>
- <li><a href="lists-forms-inset.html">Inset lists with forms</a></li>
- <li><a href="lists-inset.html">Inset styled lists</a></li>
- <li><a href="lists-performance.html">List performance test</a></li>
- <li data-theme="a"><a href="lists-themes.html">Theming lists</a></li>
- </ul>
- </div>
- </div>
- </div><!-- /content -->
- <div data-role="footer" class="footer-docs" data-theme="c">
- <p>© 2011-2012 The jQuery Project</p>
- </div>
- </div><!-- /page -->
- </body>
- </html>
|