Skip to content

Instantly share code, notes, and snippets.

@ktquez
Created August 11, 2017 13:55
Show Gist options
  • Select an option

  • Save ktquez/24919b70aa6e0e243e2154ea04bc10b2 to your computer and use it in GitHub Desktop.

Select an option

Save ktquez/24919b70aa6e0e243e2154ea04bc10b2 to your computer and use it in GitHub Desktop.
<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