creativelive / appear

execute callbacks when dom elements appear in and out of view
http://creativelive.github.io/appear/
MIT License
177 stars 43 forks source link

how to add and remove class #17

Closed andiardogit closed 6 years ago

andiardogit commented 6 years ago

how to add and remove class when appear and disappear

JustinBeaudry commented 6 years ago

Use appearlazy as that handles this for you by placing the appeared class name for you. Otherwise see https://github.com/creativelive/appear/blob/master/lib/appearlazy.js for an example for how to do this yourself.