jlmakes / scrollreveal

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

Cleanup default seems to be false #482

Closed bokub closed 5 years ago

bokub commented 5 years ago

According to this page of documentation, the default for cleanup is true

image

However, this jsFiddle proves the opposite:

ScrollReveal().reveal('.a', {}); // Doesn't clean
ScrollReveal().reveal('.b', {cleanup: true}); // Cleans as expected

I'm using the latest version from unpkg.com

jlmakes commented 5 years ago

Thanks for this @bokub.

The documentation there is incorrect: options.cleanup defaulting to true breaks the expected behavior of the sync() method, which was a mistake made during the beta. I have corrected the error!