Jump to content
Search Community

Detect, if a pinned element is next to another element

LutzDev test
Moderator Tag

Recommended Posts

Hi everyone,


I am trying to detect if a pinned sidebar (box element in the codepen-example) is next to (between) a specific element (section element in the codepen-example) when scrolling. For this,  the top corner of the blue box should act as "scroller-end" and the its bottom-corner as "scroller-start". At the moment the "scroller-start" and "scroller-end" is related to the viewport. Changing the "scroller" does not give the result I expected.

I would appreciate any guidance or suggestions on how to solve this issue. Thanks in advance for your help!

See the Pen LYMEmPQ by LutzDev (@LutzDev) on CodePen

Link to comment
Share on other sites

Hi,

 

I've read your post a few times and looked at the codepen demo for a while and I can't seem to understand what you're trying to do here.

 

Please be as specific as you can about the issue you're having and what you are trying to do and if possible post a link to a website that works in the way you intend.

 

Happy Tweening!

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