Paul123
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by Paul123
-
-
Hi Guys!
Is there a way in GSAP3 to retrieve the target object of a tween?
example:
gsap.to('.selector', { duration: 1, y: theTarget.offsetHeight} )
If I remember correcty, there is a utility function in GSAP that retrieves the target DOM. That way you don't have to type the selector again.
Thank You!!
How to get gsap's target object?
in GSAP
Posted
Thank You! I didn't thought of that one! Will def go with this route!
PS:
But yeah, I remember GSAP having a way of accessing the target object - it's something that's not in the docs i think. If I'm not mistaken, I used "it" when I was working with GSAP Draggable. It's like a shortcut or something 😅