Share Posted October 26, 2021 3 hours ago, OSUblake said: I'm guessing the nullTargetWarn doesn't apply to ScrollTrigger, and is just for animations. But like Cassie said, the best thing to do would be to check for the target before running your code. Yes, but I should be able to change that in the next release. And again, those are only warnings and they don't alter functionality at all. End users would never see those messages - it's purely about developer convenience (it helps troubleshoot your code). Link to comment Share on other sites More sharing options...
Share Posted March 4, 2022 @fernandofas I have the exact same issue. How did you solve it? Can you give some more input please Link to comment Share on other sites More sharing options...
Share Posted March 4, 2022 For every trigger I created a new variable (let) and a different class for each block to be animated. So, every single animation has it's own class and variable name. Shame that could be done with just one call as all the animations are the same. let elementg = document.querySelector('.aso-pic-align') if (elementg) { gsap.from(".aso-pic-align", { duration: .5, stagger: true, y: 50, opacity: 0, stagger: 0.2, ease: "linear.none", scrollTrigger: { trigger: ".aso-pic-align", toggleActions: "restart none none reverse", start: "top 95%", end: "bottom 95%" } }); } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now