Ilyaz Posted February 14 Posted February 14 OHello, everybody! I have a Scrolltrigger and start parameter something like this "top 50%". But on mobile devices this is to late. Can I via machmedia do some conditions on start position? I honestly try to Google it but with no luck. Thank you!
mvaneijgen Posted February 14 Posted February 14 Check out the docs https://gsap.com/docs/v3/GSAP/gsap.matchMedia()/ Hope it helps and happy tweening!
Ilyaz Posted February 14 Author Posted February 14 Thank you! I read this docs. My question is can I do something like this for start parameter: isDesktop : "top 40%" ? "top 80%"
mvaneijgen Posted February 14 Posted February 14 What have you tried already? We love to see what you can come up with, that way we can see your thought process and thus better help you understand the tools! Here is a starter template which loads all the plugins, post back here with a minimal demo and someone will surely point you in the right direction. See the Pen aYYOdN by GreenSock (@GreenSock) on CodePen.
Rodrigo Posted February 16 Posted February 16 On 2/14/2026 at 7:44 AM, Ilyaz said: My question is can I do something like this for start parameter: isDesktop : "top 40%" ? "top 80%" Absolutely! Just check the conditions syntax in the docs, create a simple demo in your local environment and experiment with ti: https://gsap.com/docs/v3/GSAP/gsap.matchMedia()/#conditions Happy Tweening!
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