export default {
  mounted() {
    $(document).ready(() => {
      const elements = $('.fadeInAnim')

      Object.keys(elements).forEach((item, index) => {
        if (index < elements.length) {
          this.$gsap.fromTo(
            elements[item],
            { y: 20, opacity: 0 },
            {
              y: 0,
              opacity: 1,
              duration: 0.5,
              scrollTrigger: {
                trigger: elements[item],
                start: 'top 90%'
              }
            }
          )
        }
      })
    })
  }
}
