Jump to content
Search Community

Slider transitions with GSAP and Scrolling

yulia test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Now you're missing a "." before the methods... ?

 

.to('#indicator', 0.5, {
    width: '40%',
    ease: Power0.easeOut
  })
to('.pagination-bar', 0.5, { // You're missing the "." here
    backgroundColor: 'green',
    ease: Power0.easeOut
  })

 

Maybe, take a little break. You might be overworking yourself. :)

 

  • Like 1
  • Thanks 1
  • Haha 1
Link to comment
Share on other sites

Hi guys! Another question with the same slider

See the Pen EJqVEz by yuliarushay (@yuliarushay) on CodePen

 

Is it possible to add slide autoplay? How to do it? I see options only with slide navigation buttons, but not with Forward and Back buttons.

Help me please)

 

Edited by Dipscom
added hyperlink
Link to comment
Share on other sites

You can do either way.

 

Depending on the complexity of your animations is advisible to break into several timelines but I guess that is not what you are trying to achive here.

 

What is it that you want? A button to toggle autoplay that if clicke the timeline plays completely? And if not, it pauses on those spots?

 

If that is what you are after, instead of having those .addPause() calls, you call a function to check if the timeline should pause or not. See bellow.

 

See the Pen bydNew?editors=0011 by dipscom (@dipscom) on CodePen

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

45 minutes ago, Dipscom said:

You can do either way.

 

Depending on the complexity of your animations is advisible to break into several timelines but I guess that is not what you are trying to achive here.

 

What is it that you want? A button to toggle autoplay that if clicke the timeline plays completely? And if not, it pauses on those spots?

 

If that is what you are after, instead of having those .addPause() calls, you call a function to check if the timeline should pause or not. See bellow.

 

 

 

Exactly what I need! Only without a button Autoplay. Added to my slider, now it works perfectly :) Thank you ?

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