jlmakes / scrollreveal

Animate elements as they scroll into view.
https://scrollrevealjs.org/
22.39k stars 2.26k forks source link

Event for Unrevealed #466

Closed Ace000001 closed 6 years ago

Ace000001 commented 6 years ago

Hi!

I am trying to hook an event (something like beforeUnreveal() and afterUnreveal()) when an elements gets hidden when it is out of view port. In the API i found 4 events but but my impression of those is that those are when element is showing after coming into view port. Is there any way to do what i am trying to achieve?

Thanks!

jlmakes commented 6 years ago

There are already two callbacks that should help with this.

option.beforeReset fires after an element leaves the viewport option.afterReset fires after an element leaves the viewport and has completed its reset