Jump to content
Search Community

Disable horizontal snapping sections - ScrollTrigger on mobile and tablet

SBdC test
Moderator Tag

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...