Jump to content
GreenSock

JackiChan

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by JackiChan

  1. Bro, wihout any minimal codepen, you helped me, this code is such silly easy for you, and also explained, that doing codepen with isolation will take more time than our conversation. Regarding my last Q i found that to() has callback, and this one helped me: tl.to(".ls", { yPercent: -100, opacity: 0, onComplete: () => // Action that i needed, }) Thank you.
  2. Thank you, but below you will see onLeave callback, that fires when page is loaded, now then element is onLeave. Is ia a good place to have this callback? if (document.querySelector('.ls')) { tl.to(".ls", { yPercent: -100, opacity: 0, onLeave: () => alert (1) }) }
  3. Perfect, thanks. I was not aware about this solution. BTW: Is it possible to have a callback only for one item as shown? This is not working and raise alert on page load, so i suspect there is a way. Thanks a lot ! tl.to(".ls", { yPercent: -100, opacity: 0, }, "myLabelStartSameTime") tl.to(".rs", { yPercent: 100, opacity: 0, onLeave: () => alert (1) }, "myLabelStartSameTime")
  4. Hi, I have 2 classes that share the same scroltrigger (.main): gsap.fromTo(".ls, .rs", { y: "0", opacity: 1}, {y: '-100%', opacity: 0, scrollTrigger: { trigger: ".main", scrub: true, pin: true, start: 'top top', end: '+=50%', } }) Both has y:'-100%', is there a way for .rs class to be animated y:'100%' instead? So .ls will go up on scroll, and .rs should go down. Thanks you for any help.
  5. HI Guys, i found cool website, that has nice zoom effect. If you open this link, and wait for animation end, you will see ENTER button, after this you can see this cool zoom animation. My question is: is it easy to do with scrolltrigger, and are they any examples of similar effect? I can't find anything usefull. Thank you. https://365ayearof.cartier.com/
×