4
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
Code distributed by Google as part of the polymer project is also
9
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
15
<title>iron-pages demo</title>
17
<meta charset="utf-8">
18
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
19
<meta name="mobile-web-app-capable" content="yes">
20
<meta name="apple-mobile-web-app-capable" content="yes">
22
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
23
<link rel="import" href="../../paper-styles/color.html">
24
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
25
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
26
<link rel="import" href="../iron-pages.html">
28
<style is="custom-style" include="demo-pages-shared-styles"></style>
31
<div class="vertical-section-container centered">
32
<h3>iron-pages shows only one of its children at a time.</h3>
35
<style is="custom-style">
48
iron-pages div:nth-child(1) {
49
background-color: var(--google-blue-500);
51
iron-pages div:nth-child(2) {
52
background-color: var(--google-red-500);
54
iron-pages div:nth-child(3) {
55
background-color: var(--google-green-500);
58
<p>Click on a page to advance to the next one.</p>
59
<iron-pages selected="0">
65
document.addEventListener('click', function(e) {
66
var pages = document.querySelector('iron-pages');