Before Reset

function

options.beforeReset is a function that fires when a reset is triggered.

This callback can only be triggered if options.reset is true.

Default Value

{ beforeReset: function (el) {} }

El

nodeThe HTML element that has just begun its reset.

Usage

function myCallback (el) {
    el.classList.remove('is-visible');
    el.classList.add('is-animating');
}

ScrollReveal().reveal('#example', { beforeReset: myCallback });