Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
andystent

Smooth scroll to next panel - too fast

Recommended Posts

3 minutes ago, ZachSaucier said:

Hey Andy,

 

Not sure what you're trying to do. You have two functions that are named the same thing so one is going to override the other. Your if statement is also checking if the element exists, not if the elementIsClicked variable is true or not. Are you trying to do something like this?

 

 

Sorry that duplicate function was an oversight :|

 

I essentially want the click functionality to happen when the link is clicked (which is fine and works), but other stuff to be active the whole time the button is not being clicked (in this case the scrollmagic stuff).

 

Does that make sense?

Link to post
Share on other sites

Again, I think that you need to handle that by checking a variable within your ScrollMagic listener like I suggested before. 

 

Unfortunately we don't have the capacity to answer every question not related to GSAP. So you may not get more responses from other members of this forum.

  • Like 1
Link to post
Share on other sites

Hey @andystent,

 

Combining ScrollMagic with other scroll processes is not conflict-free - my opinion.
You can remove the SM-scenes and add again (see uncommented lines). But it remains a little 'SM'!

 

See the Pen rNaWvog by mikeK (@mikeK) on CodePen

 

Just tween it using GreenSock.

Mikel

 

  • Like 3
Link to post
Share on other sites

Thank you Mikel! I think I can work with this to get the effect I'm needing. Appreciate the help!

Link to post
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.

×