Jump to content
Search Community

Enabled pinSpacing is blocking clicking on links in section below

Kinka

Recommended Posts

Posted

Hi, I'm struggling with making my href links in my Footer to be clickable. When I set pinSpacing to true in section above (Projects component) - empty space below projects is too big, but when I set it to 'false' everything looks great but I am not able to click on links in my Footer. Seems I need to keep z-indexes to keep this 'revealing footer' effect and I'm wondering how to resolve this.

Thank you!

Stackblitz:
https://stackblitz.com/edit/stackblitz-starters-qptd1bix?file=components%2FProjects.tsx


 

Posted

Hi,

 

You can reveal the footer using other approach like Clip Path and with a larger z-index value you can have pointer events, as shown in this demo:

See the Pen rNXKeGX by GreenSock (@GreenSock) on CodePen.

 

Hopefully this helps

Happy Tweening!

Posted

Hi, thanks. 😀 I was digging in forum and I found one topic with changing pointer-events in similar problem, and I tried adding this to pinned section in Projects component:
 

onLeave: () => {
	gsap.set(".projectsSection", { pointerEvents: "none" });
},
onEnterBack: () => {
	gsap.set(".projectsSection", { pointerEvents: "auto" });
}

it seems to be working too 🤔

  • Like 1
Posted

Yeah, whatever works better for you in your particular project is fine, the demo I posted requires a specific setup for the footer and the other sections of the site. If it works it works, so if the code you have in place does what is supposed to, is fine.

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