Jump to content
Search Community

Update anchors on scroll

smallio 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

Hi guys,

 

I've always found animating anchor links with CSS very laborious, however up until now it's been a bit too complex for me to do it with GSAP. I've decided to take a shot at it & have so far I've spliced together an example with fullpage.js & one of @OSUblake pens. At the moment the nav dots work on click, however I'm stuck updating them via scroll. My idea was to use the if statements but so far no cigar.

 

Any ideas how this would be done in tandem?

 

Cheers,

Smallio

 

See the Pen MPZorO?editors=0010 by smallio (@smallio) on CodePen

Link to comment
Share on other sites

Hey @smallio :)

 

You're back. I know nothing about fullpage.js, but this animation would be pretty easy with the ScrollTo plugin. How about something like this?

 

 

See the Pen KGbXwY by PointC (@PointC) on CodePen

It's quick and basic, but maybe it can point you in a direction that uses only GSAP products instead of other 3rd party scripts. ;)

 

Does that help?

 

Happy tweening.

:)

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

3 hours ago, PointC said:

Hey @smallio :)

 

You're back. I know nothing about fullpage.js, but this animation would be pretty easy with the ScrollTo plugin. How about something like this?

 

 

See the Pen KGbXwY by PointC (@PointC) on CodePen

It's quick and basic, but maybe it can point you in a direction that uses only GSAP products instead of other 3rd party scripts. ;)

 

Does that help?

 

Happy tweening.

:)

 

Great example. Thank's @PointC

 

Will give this a shot now :)

 

Cheers,

Smallio

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