| OLD | NEW |
| (Empty) |
| 1 | |
| 2 /** | |
| 3 `iron-selector` is an element which can be used to manage a list of elements | |
| 4 that can be selected. Tapping on the item will make the item selected. The `
selected` indicates | |
| 5 which item is being selected. The default is to use the index of the item. | |
| 6 | |
| 7 Example: | |
| 8 | |
| 9 <iron-selector selected="0"> | |
| 10 <div>Item 1</div> | |
| 11 <div>Item 2</div> | |
| 12 <div>Item 3</div> | |
| 13 </iron-selector> | |
| 14 | |
| 15 If you want to use the attribute value of an element for `selected` instead of
the index, | |
| 16 set `attrForSelected` to the name of the attribute. For example, if you want
to select item by | |
| 17 `name`, set `attrForSelected` to `name`. | |
| 18 | |
| 19 Example: | |
| 20 | |
| 21 <iron-selector attr-for-selected="name" selected="foo"> | |
| 22 <div name="foo">Foo</div> | |
| 23 <div name="bar">Bar</div> | |
| 24 <div name="zot">Zot</div> | |
| 25 </iron-selector> | |
| 26 | |
| 27 `iron-selector` is not styled. Use the `iron-selected` CSS class to style the
selected element. | |
| 28 | |
| 29 Example: | |
| 30 | |
| 31 <style> | |
| 32 .iron-selected { | |
| 33 background: #eee; | |
| 34 } | |
| 35 </style> | |
| 36 | |
| 37 ... | |
| 38 | |
| 39 <iron-selector selected="0"> | |
| 40 <div>Item 1</div> | |
| 41 <div>Item 2</div> | |
| 42 <div>Item 3</div> | |
| 43 </iron-selector> | |
| 44 | |
| 45 @demo demo/index.html | |
| 46 */ | |
| 47 | |
| 48 Polymer({ | |
| 49 | |
| 50 is: 'iron-selector', | |
| 51 | |
| 52 behaviors: [ | |
| 53 Polymer.IronMultiSelectableBehavior | |
| 54 ] | |
| 55 | |
| 56 }); | |
| 57 | |
| OLD | NEW |