Jump to content
Search Community

Redirections using scrollTrigger

Franco95 test
Moderator Tag

Recommended Posts

Hi there! I'm facing an issue with my scrollTrigger functionality.

 

I have my website with 5 sections and I'm using gsap to jump to the next section and overlap it with the scroll, my problem is that now I need to add redirections in my navbar to each of those sections but the result is not good, I have to repeat my "goToSection" function multiple times to reach from section "2" to section "4" for example.

 

So I want to achieve with one click and one function execution, scrolling to the desired section with no problem

 

I will appreciate any help from you guys! Thank you very much.

I drop here a minimal demo of the problem

See the Pen gOqdooO by francobuceta (@francobuceta) 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...