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

how to setup different animation for in and out #79

Closed
GiorgosK opened this issue Mar 8, 2021 · 1 comment
Closed

how to setup different animation for in and out #79

GiorgosK opened this issue Mar 8, 2021 · 1 comment

Comments

@GiorgosK
Copy link

GiorgosK commented Mar 8, 2021

Suppose one wants to have different animation for when element is entering threshold and different when exiting
Is there an easy way without resorting to javascript solution ?

@mciastek
Copy link
Owner

mciastek commented Mar 21, 2021

I think you'll need to use some extra javascript to achieve the effect. You try to use events and add a custom CSS class with leaving animation. You need to remember to remove this leaving CSS class after the animation is done, in order to not broke your animations when you'll play them again. You can add a transitionend to element that is being animated and clear the class in an event handler.

@mciastek mciastek closed this as completed May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants