| 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 <html> |
| 11 <head> |
| 12 <title>neon-animated-pages demo: dropdown</title> |
| 13 |
| 14 <meta charset="utf-8"> |
| 15 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 16 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initia
l-scale=1, user-scalable=yes"> |
| 17 |
| 18 <script src="../../../webcomponentsjs/webcomponents-lite.js"></script> |
| 19 |
| 20 <link rel="import" href="../../../paper-styles/paper-styles.html"> |
| 21 <link rel="import" href="../../neon-animated-pages.html"> |
| 22 <link rel="import" href="../../neon-animations.html"> |
| 23 <link rel="import" href="animated-dropdown.html"> |
| 24 |
| 25 </head> |
| 26 <body> |
| 27 |
| 28 <template is="dom-bind"> |
| 29 |
| 30 <button dropdown-id="dropdown" on-click="_onButtonClick">dropdown</button> |
| 31 <br> |
| 32 <animated-dropdown id="dropdown" on-click="_onDropdownClick">Hello world!<
/animated-dropdown> |
| 33 |
| 34 </template> |
| 35 |
| 36 <script> |
| 37 |
| 38 var scope = document.querySelector('template[is="dom-bind"]'); |
| 39 |
| 40 scope._onButtonClick = function(event) { |
| 41 var dropdown = document.querySelector('#' + event.target.getAttribute('d
ropdown-id')); |
| 42 if (dropdown) { |
| 43 dropdown.show(); |
| 44 } |
| 45 }; |
| 46 |
| 47 scope._onDropdownClick = function(event) { |
| 48 event.target.hide(); |
| 49 }; |
| 50 |
| 51 </script> |
| 52 |
| 53 </body> |
| 54 </html> |
| OLD | NEW |