Before Reveal

function

options.beforeReveal is a function that fires when a reveal is triggered.

Default Value

{ beforeReveal: function (el) {} }

El

nodeThe HTML element that has just begun its reveal.

Usage

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

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