SBdC Posted June 6, 2020 Share Posted June 6, 2020 Dear GSAP team, I am using the example horizontal snapping sections - ScrollTrigger- on a website I am building and I am trying to disable the scrollTrigger on tablet and mobile. For this devices I am setting the container to display block and want to have again a vertical scroll. I am listening to the media query change on JS. It works, on page load and if one resizes the viewport up, but not if you resize down. I have the feeling that there is a better way to do this and would appreciate some help. Thank you and all the best, Sara See the Pen ExPjXMb by SBdC (@SBdC) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted June 6, 2020 Share Posted June 6, 2020 I think this is what you were after, right? See the Pen NWxqaOL?editors=0010 by GreenSock (@GreenSock) on CodePen In the next release of ScrollTrigger, I'll add some code in the kill() method that'll automatically kill the scrub and snap animations, so those extra lines won't be necessary in the demo. 👍 3 Link to comment Share on other sites More sharing options...
SBdC Posted June 7, 2020 Author Share Posted June 7, 2020 Amazing! Exactly what I needed! Thank you 😃 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