Share Posted August 19, 2020 I have panels for content that use a scroll trigger (scrubbing & Pinning) to reveal. I would like users to be able to click on the nav to jump to one of the content panels. After leveraging bits from this wonderful forum, I was able to get a working prototype. Only issue I'm having now is that when a user clicks to go to a lower content panel it works. Then when they click on a higher content panel it appears the offset is off by about 50% the window.innerHeight. When I use an OffsetY value (window.innerHeight / 2) the lower content panels show at 50% but the higher panels show correctly. I feel like if I could determine the scroll position of the element I'm scrolling to I could just add the correct offset to compensate. Is there any way to correct this behaviour? (FYI, It doesn't appear to be showing well in the embeded codepen... Seems to work fine on codepen.io) See the Pen oNxzEPg by darrylvos (@darrylvos) on CodePen Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now