OLD | NEW |
(Empty) | |
| 1 <!doctype html> |
| 2 <!-- |
| 3 Copyright 2013 The Polymer Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style |
| 5 license that can be found in the LICENSE file. |
| 6 --> |
| 7 <html> |
| 8 <head> |
| 9 <title>Cards</title> |
| 10 <script src="../platform/platform.js"></script> |
| 11 <link rel="import" href="polymer-ui-card.html"> |
| 12 <style> |
| 13 #cards { |
| 14 margin: 0 auto; |
| 15 background: #eee; |
| 16 overflow: auto; |
| 17 -webkit-user-select: none; |
| 18 -moz-user-select: none; |
| 19 } |
| 20 |
| 21 polymer-ui-card { |
| 22 display: block; |
| 23 height: 200px; |
| 24 width: 240px; |
| 25 margin: 20px auto; |
| 26 padding: 30px; |
| 27 } |
| 28 </style> |
| 29 </head> |
| 30 <body unresolved> |
| 31 <div id="cards"> |
| 32 <polymer-ui-card swipeable>Swipe Me!</polymer-ui-card> |
| 33 <polymer-ui-card swipeable>Swipe Me!</polymer-ui-card> |
| 34 <polymer-ui-card></polymer-ui-card> |
| 35 <polymer-ui-card swipeable>Swipe Me!</polymer-ui-card> |
| 36 <polymer-ui-card></polymer-ui-card> |
| 37 </div> |
| 38 |
| 39 <script> |
| 40 document.addEventListener('polymer-ready', function() { |
| 41 document.querySelector('#cards').addEventListener( |
| 42 'polymer-card-swipe-away', function(e) { |
| 43 e.target.parentNode.removeChild(e.target); |
| 44 }); |
| 45 }) |
| 46 </script> |
| 47 </body> |
| 48 </html> |
OLD | NEW |