Advertisement
Guest User

Untitled

a guest
Dec 19th, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. <link rel="import" href="../core-animated-pages/core-animated-pages.html">
  2. <link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
  3. <link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
  4. <link rel="import" href="../core-animated-pages/transitions/slide-down.html">
  5. <link rel="import" href="../core-animated-pages/transitions/slide-up.html">
  6. <link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
  7.  
  8. <polymer-element name="my-element">
  9.  
  10. <template>
  11. <style>
  12. :host {
  13. position: absolute;
  14. width: 100%;
  15. height: 100%;
  16. box-sizing: border-box;
  17. }
  18. #core_animated_pages {
  19. width: 420px;
  20. height: 582px;
  21. overflow: hidden;
  22. left: 360px;
  23. top: 180px;
  24. position: absolute;
  25. background-color: rgb(238, 238, 238);
  26. }
  27. </style>
  28. <core-animated-pages selectedindex="0" notap id="core_animated_pages">
  29. <section id="section" layout horizontal center center-justified active>
  30. </section>
  31. <section id="section1">
  32. </section>
  33. <section id="section2">
  34. </section>
  35. </core-animated-pages>
  36. </template>
  37.  
  38. <script>
  39.  
  40. Polymer({
  41.  
  42. });
  43. var up = true;
  44. var max = 3;
  45. function stuff() {
  46. console.log('hai hai hai');
  47. var p = document.querySelector('core-animated-pages');
  48. console.log(p);
  49. /*if (up && p.selected === max || !up && p.selected === 0) {
  50. up = !up;
  51. }
  52. if (up) {
  53. p.selected += 1;
  54. } else {
  55. p.selected -= 1;
  56. }*/
  57. p.selected = 2;
  58. p.setAttribute('selected', 2);
  59. p.setAttribute('selectedIndex', 2);
  60. p.setAttribute('selectedindex', 2);
  61. }
  62. </script>
  63.  
  64. </polymer-element>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement