Share Posted February 10 Hello everyone of GSAP. I have a project where I have to incorporate animations according to screen size (Desktop, Tablet & Mobile, for each device), so, we have 3 different animations, the question is, how can I make GSAP run one animation file or another depending on the size of the screen? the animations between these 3 services are really very different. I tried with an if according to the innerWidth, however I think that before that, I must execute some kill and some enable in case the browser resize is done, because of the responsive Thanks a lot for your helping Link to comment Share on other sites More sharing options...
Solution Solution Share Posted February 10 Hi. It sounds like you are looking for gsap.matchMedia() the docs have an excellent video and a bunch of examples to get you on your way. 4 Link to comment Share on other sites More sharing options...
Author Share Posted February 13 thank you very much carl, that worked perfectly! 1 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