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.
10 <meta charset=
"utf-8">
11 <meta http-equiv=
"X-UA-Compatible" content=
"IE=edge,chrome=1">
12 <meta name=
"viewport" content=
"width=device-width, initial-scale=1, user-scalable=no">
14 <title>core-transition
</title>
16 <script src=
"../webcomponentsjs/webcomponents.js"></script>
18 <link href=
"core-transition-css.html" rel=
"import">
22 background-color: lime;
33 <div id=
"animate-me" hidden
></div>
35 <select id=
"sel" onchange=
"setup();">
36 <option value=
"core-transition-fade" selected
>core-transition-fade
</option>
37 <option value=
"core-transition-center">core-transition-center
</option>
38 <option value=
"core-transition-top">core-transition-top
</option>
39 <option value=
"core-transition-bottom">core-transition-bottom
</option>
40 <option value=
"core-transition-left">core-transition-left
</option>
41 <option value=
"core-transition-right">core-transition-right
</option>
44 <button onclick=
"stuff();">toggle
</button>
48 document
.addEventListener('polymer-ready', function() {
51 document
.getElementById('animate-me').removeAttribute('hidden');
62 meta
= document
.createElement('core-meta');
63 meta
.type
= 'transition';
69 var target
= document
.getElementById('animate-me');
72 transition
.teardown(target
);
75 var value
= document
.getElementById('sel').selectedOptions
[0].value
;
76 transition
= getMeta().byId(value
);
77 transition
.setup(target
);
81 var target
= document
.getElementById('animate-me');
82 state
.opened
= !state
.opened
;
83 transition
.go(target
, state
);