Hi,
I am new to GSAP. I try to do overlapping setions with menu. Everything works like I expected expcept menu anchor links. If I am on the top of the page and I click on some link. everything works perfect. Problem is when I am at the bottom of the page and I click on some link in the menu. It takes me to the right section but this section is overlapped with section before.
My idea was somehow reset or unpin section when leaves from the viewport, but I cant find the righ
Hey @greatex - welcome to the forum.
Here is a possible workaround for your issue.
On click, first check if the current scroll-position is bigger or higher than the targets offsetWidth multiplied by the index of the link you want to go to, which is the same as the index of the section in your case because they are in the same order. So this would obviously not work if you had a link placed somewhere in between, that should direct to a section somewhere else - also the cal