omkar Posted April 29, 2023 Share Posted April 29, 2023 i want to rotate on shoe and zindex on blue backgroud but rotation not working and zindex in delayed and dont know why scrub is not working in codepen in website it is working See the Pen bGmrYGv by omkarcode (@omkarcode) on CodePen Link to comment Share on other sites More sharing options...
Rodrigo Posted April 29, 2023 Share Posted April 29, 2023 Hi, The toggleActions config string goes in the scrollTrigger config object, not in the tween config object: // Won't work parallaxt2.to('#Layer_1', { rotationX: 90, toggleAction: 'play none none reverse', transformOrigin: "bottom 50%" }) // Will Work let parallaxt2 = gsap.timeline({ ease: 'none', scrollTrigger: { trigger: '#topaddedsectionshoeimg', start: 'center center', end: 'bottom center', scrub: true, toggleAction: 'play none none reverse', } }); Also the reason your codepen wasn't working is because you have the link for the GSAP Core file but not for ScrollTrigger. Is better to add those links in the codepen's JS configuration section: Finally I created a fork of your codepen that seems to work the way you intend: See the Pen WNaEdRb by GreenSock (@GreenSock) on CodePen Hopefully this helps. Happy Tweening! Link to comment Share on other sites More sharing options...
omkar Posted May 2, 2023 Author Share Posted May 2, 2023 Sometime z-Index is delayed because of that blue backgroud is come of img for some millisecond and while resize page marker(start and end points) shifts little bit because of that animation appers bit early than expected Link to comment Share on other sites More sharing options...
Rodrigo Posted May 2, 2023 Share Posted May 2, 2023 Hi, Sorry I don't follow your last post at all. Are you still having issues? If so, please create a minimal demo or fork the last one I provided and be as specific as you can about it. Happy Tweening! Link to comment Share on other sites More sharing options...
omkar Posted May 3, 2023 Author Share Posted May 3, 2023 code that you provided that have same problem Sometime(rarely) z-Index is delayed because of that blue backgroud is come on img for some millisecond. Link to comment Share on other sites More sharing options...
Rodrigo Posted May 3, 2023 Share Posted May 3, 2023 Hi, As I mentioned before I'm having a hard time following what you're trying to do. Please be specific about what you're trying to do, what the issue is and provide a minimal demo. Without a demo and vague description, there is almost nothing we can do to help you. Happy Tweening! 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