Cleanup

boolean

When options.cleanup is true, ScrollReveal will call clean() on your reveal target once they complete their animation. Keep in mind, animations using option.reset true will never “complete”.

If you are calling sync() in your project, you likely do not want to enable options.cleanup: visible elements that have already revealed will reveal again after each call!

Default Value

{ cleanup: false }

Usage

These two blocks of code are functionally equivalent.

ScrollReveal().reveal('.items', { cleanup: true });
ScrollReveal().reveal('.items', {
    afterReveal: function(el) {
        ScrollReveal().clean(el);
    }
});