Share Posted January 23 Hi guys, I'm experimenting with an horizontal scroll section in one of my projects. I used one of the code in the examples given in the Scrolltrigger documentation and modified it a bit. Basically, the horizontal scroll triggers when a section with the class "horizontal" arrives. Everything works great. The problem I'm having is with the mobile version: how could I "destroy" scrolltrigger in smallest screens to stop the horizontal scroll and make the sections go one below the other? I tried with a CSS approach but I don't think it's the right approach. As usual, thanks for your help. See the Pen BaPYJVE by luigi-basile (@luigi-basile) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted January 23 Hi gigi, you can use matchMedia alongside normal CSS media queries, Here you go! See the Pen qByxKNy?editors=0110 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
Author Share Posted January 23 Very cool, thanks a lot Cassie. 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