Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger animation based on visibility of another element #161

Open
russellbrown opened this issue Dec 10, 2023 · 0 comments
Open

Trigger animation based on visibility of another element #161

russellbrown opened this issue Dec 10, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@russellbrown
Copy link

Thank you very much for creating this. I have two related questions so I hope you don't mind me posting both in the same issue.

  1. is it possible to control when the animation is triggered, e.g. when the element reaches the top/centre of the viewport as opposed to when it enters the bottom? And / or perhaps some kind of offset feature, e.g. when the element has been scrolled 300px into view, or when it reaches 100px from the top of the viewport?

  2. is it possible to trigger an element's animation based on the visibility / trigger point of another element? I'm thinking along the lines of the anchor setting in AOS.js.

Putting these two together, I have a situation where I have multiple elements all positioned at various vertical points in a section and I would like to trigger all their animations at the same time when the top-most item approaches the top of the viewport. Otherwise the animation looks staggered which isn't the look I'm aiming for.

Many thanks.

@BobbieGoede BobbieGoede added the enhancement New feature or request label Feb 23, 2024
@BobbieGoede BobbieGoede changed the title Trigger animation based on visibility of another element? Trigger animation based on visibility of another element Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants