function
options.beforeReset
is a function that fires when a reset is triggered.
This callback can only be triggered if options.reset
is true
.
{ beforeReset: function (el) {} }
node | The HTML element that has just begun its reset. |
function myCallback (el) {
el.classList.remove('is-visible');
el.classList.add('is-animating');
}
ScrollReveal().reveal('#example', { beforeReset: myCallback });