OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <!-- |
| 3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. |
| 4 This code may only be used under the BSD style license found at http://polymer.g
ithub.io/LICENSE.txt |
| 5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI
BUTORS.txt |
| 7 Code distributed by Google as part of the polymer project is also |
| 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
| 9 --> |
| 10 |
| 11 <html> |
| 12 <head> |
| 13 |
| 14 <title>iron-selector</title> |
| 15 |
| 16 <meta charset="utf-8"> |
| 17 <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 18 |
| 19 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
| 20 <link rel="import" href="../iron-selector.html"> |
| 21 |
| 22 <style> |
| 23 |
| 24 iron-selector > * { |
| 25 padding: 8px; |
| 26 } |
| 27 |
| 28 .iron-selected { |
| 29 background-color: #ddd; |
| 30 } |
| 31 |
| 32 </style> |
| 33 |
| 34 </head> |
| 35 <body> |
| 36 |
| 37 <h3>Basic</h3> |
| 38 |
| 39 <iron-selector selected="0"> |
| 40 <div>Item 0</div> |
| 41 <div>Item 1</div> |
| 42 <div>Item 2</div> |
| 43 <div>Item 3</div> |
| 44 <div>Item 4</div> |
| 45 </iron-selector> |
| 46 |
| 47 <h3>Multi-select</h3> |
| 48 |
| 49 <iron-selector multi selected-values='[0,2]'> |
| 50 <div>Item 0</div> |
| 51 <div>Item 1</div> |
| 52 <div>Item 2</div> |
| 53 <div>Item 3</div> |
| 54 <div>Item 4</div> |
| 55 </iron-selector> |
| 56 |
| 57 <h3>Example</h3> |
| 58 |
| 59 <iron-selector selected="foo" attr-for-selected="name"> |
| 60 <div name="foo">Foo</div> |
| 61 <div name="bar">Bar</div> |
| 62 <div name="zot">Zot</div> |
| 63 </iron-selector> |
| 64 |
| 65 </body> |
| 66 </html> |
OLD | NEW |