Jump to content
Search Community

Auto scroll using scrollmagic and GSAP

JamshedIqbal
Moderator Tag

Recommended Posts

JamshedIqbal
Posted
Hi Experts!!

First of all thanks to GSAP and all here experts who are doing tremendous job, helps to beginners and those who stuck in code like me :), 

I have just start development on ScrollMagic and GSAP , I have two questions:

1.  I want to auto scroll on scroll down or scroll up, for example if I am at first scene, when I scroll down, it should be go to the second scene and stop, similar behavior from scene 2 to scene 3. but in my code it is not autoscroll. I want this on mobile and desktop both  but didn't get success.

 

2. When ever scroll down on mobile, the browser address bar auto hide, that push scene on top.

 

Thank you in advance!

 

 

 

See the Pen KKWbeZv by JamshedIqbal (@JamshedIqbal) on CodePen.

Posted

You should use gsap.utils.toArrray 

 

gsap.utils.toArray(".section").

 

It will works automatically

  • Like 1
Posted

Hiya! Welcome.

If you're just starting out we recommend using our scroll plugin - ScrollTrigger - ScrollMagic isn't actually actively worked on anymore and ScrollTrigger is set up to work perfectly with your GSAP animations.

  • Like 4

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...