3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.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/CONTRIBUTORS.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/PATENTS.txt
12 <title>Selector
</title>
13 <script src=
"../webcomponentsjs/webcomponents.js"></script>
14 <link rel=
"import" href=
"core-selector.html">
17 <polymer-element name=
"selector-examples">
22 border:
1px solid #ccc;
35 border-bottom:
1px solid #ccc;
38 .list
> *.core-selected {
46 li.core-selected:after {
54 <core-selector class=
"list" selected=
"0">
62 <h2>multi-selection
</h2>
63 <core-selector class=
"list" selected=
"{{multiSelected}}" multi
>
72 <core-selector target=
"{{$.list}}" selected=
"0"></core-selector>
81 <h2>binding of a group of radio buttons to a variable
</h2>
82 <core-selector target=
"{{$.myForm}}" itemsSelector=
"input[type=radio]"
83 selected=
"{{color}}" valueattr=
"value" selectedProperty=
"checked"
84 activateEvent=
"change"></core-selector>
86 <label><input type=
"radio" name=
"color" value=
"red"> Red
</label> <br>
87 <label><input type=
"radio" name=
"color" value=
"green"> Green
</label> <br>
88 <label><input type=
"radio" name=
"color" value=
"blue"> Blue
</label> <br>
89 <p>color = {{color}}
</p>
95 Polymer('selector-examples', {
97 this.multiSelected
= [1, 3];
104 <selector-examples></selector-examples>