function
options.beforeReveal
is a function that fires when a reveal is triggered.
{ beforeReveal: function (el) {} }
node | The HTML element that has just begun its reveal. |
function myCallback (el) {
el.classList.add('is-animating');
}
ScrollReveal().reveal('#example', { beforeReveal: myCallback });