OLD | NEW |
1 <!-- | 1 <!-- |
2 @license | 2 @license |
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | 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 | 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 | 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 | 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 | 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 | 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN
TS.txt |
9 --><!-- | 9 --><html><head><link rel="import" href="../polymer/polymer.html"> |
| 10 <link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html
"> |
| 11 <link rel="import" href="../iron-selector/iron-selectable.html"> |
| 12 |
| 13 <!-- |
10 `iron-pages` is used to select one of its children to show. One use is to cycle
through a list of | 14 `iron-pages` is used to select one of its children to show. One use is to cycle
through a list of |
11 children "pages". | 15 children "pages". |
12 | 16 |
13 Example: | 17 Example: |
14 | 18 |
15 <iron-pages selected="0"> | 19 <iron-pages selected="0"> |
16 <div>One</div> | 20 <div>One</div> |
17 <div>Two</div> | 21 <div>Two</div> |
18 <div>Three</div> | 22 <div>Three</div> |
19 </iron-pages> | 23 </iron-pages> |
20 | 24 |
21 <script> | 25 <script> |
22 document.addEventListener('click', function(e) { | 26 document.addEventListener('click', function(e) { |
23 var pages = document.querySelector('iron-pages'); | 27 var pages = document.querySelector('iron-pages'); |
24 pages.selectNext(); | 28 pages.selectNext(); |
25 }); | 29 }); |
26 </script> | 30 </script> |
27 | 31 |
28 @group Polymer Iron Elements | 32 @group Iron Elements |
29 @class iron-pages | 33 @class iron-pages |
| 34 @hero hero.svg |
| 35 @demo demo/index.html |
30 @extends iron-selector | 36 @extends iron-selector |
31 --><html><head><link rel="import" href="../polymer/polymer.html"> | 37 --> |
32 <link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html
"> | |
33 <link rel="import" href="../iron-selector/iron-selectable.html"> | |
34 | 38 |
35 </head><body><dom-module id="iron-pages"> | 39 </head><body><dom-module id="iron-pages"> |
36 | 40 |
37 <style> | 41 <style> |
38 | 42 |
39 :host { | 43 :host { |
40 display: block; | 44 display: block; |
41 } | 45 } |
42 | 46 |
43 :host > ::content > :not(.iron-selected) { | 47 :host > ::content > :not(.iron-selected) { |
44 display: none !important; | 48 display: none !important; |
45 } | 49 } |
46 | 50 |
47 </style> | 51 </style> |
48 | 52 |
49 <template> | 53 <template> |
50 | 54 |
51 <content></content> | 55 <content></content> |
52 | 56 |
53 </template> | 57 </template> |
54 | 58 |
55 </dom-module> | 59 </dom-module> |
56 | 60 |
57 <script src="iron-pages-extracted.js"></script></body></html> | 61 <script src="iron-pages-extracted.js"></script></body></html> |
OLD | NEW |