Jump to content
Search Community

maipo89

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by maipo89

  1. Thank you Rodrigo, Your explanation was really simple, I had maybe just to read more into the documentation to find the solution. I'm trying to add now the matchMedia to make the animation play only up to 900px, I've tried this code as explained in the documentation, but gave me this error "gsap__WEBPACK_IMPORTED_MODULE_0__.default.matchMedia is not a function". Here is my code, I'm using VueJS import gsap from "gsap"; import { TimelineLite } from 'gsap'; import ScrollTrigger from "gsap/ScrollTrigger"; gsap.registerPlugin(ScrollTrigger); mounted() { let mm = gsap.matchMedia(); mm.add("(min-width: 900px)", () => { //my previes code// }) }
  2. Hello everyone, I'm new to Gsap. I was trying to do this scrolltrigger animation where on scroll, the red box should scale and fit the yellow container, and at the same time text 1 and text 2 move at the center of the square. Any idea how to acheive this? I added a codepen with what I've done, but it seems not working. Thank you everyone.
×
×
  • Create New...