Created
August 11, 2017 13:55
-
-
Save ktquez/24919b70aa6e0e243e2154ea04bc10b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <div id="box"> | |
| {{ desc }} | |
| </div> | |
| </template> | |
| <script> | |
| import { TweenMax } from 'gsap' | |
| import $ from 'jquery' | |
| export default { | |
| name: 'gsapTest', | |
| data () { | |
| return { | |
| desc: 'My page with gsap and jQuery' | |
| } | |
| }, | |
| // Dispara assim que o componente for montado no DOM (HTML) | |
| mounted () { | |
| TweenMax.to('#box', 10, {width: 0}) | |
| $('#box').hide() | |
| } | |
| } | |
| </script> | |
| <style> | |
| #box{ | |
| position: absolute; | |
| margin: 50px 50px; | |
| width: 80px; | |
| height: 80px; | |
| background-color: red; | |
| } | |
| </style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment