You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to start some js (CountUp.js) on event that happens when the element starts revealing, not when it is revealed. So it is being revealed already being animated. Can't find a callback for that. Am I missing it? If there is not one, is it possible to add it?
The text was updated successfully, but these errors were encountered:
There is currently no such thing as beforeReveal and beforeReset, but it wouldn’t be too difficult to add those in. For now, I will icebox this for a future release.
@ivangretsky Thanks for the request, great idea. It’s now live in 3.3.x 🎉
Example:
// Let’s see all 4 together now...sr.reveal('.foo',{beforeReveal: (el)=>console.log('Reveal started...'),afterReveal: (el)=>console.log('Reveal complete.'),beforeReset: (el)=>console.log('Reset triggered...'),afterReset: (el)=>console.log('Reset complete.')})
I need to start some js (CountUp.js) on event that happens when the element starts revealing, not when it is revealed. So it is being revealed already being animated. Can't find a callback for that. Am I missing it? If there is not one, is it possible to add it?
The text was updated successfully, but these errors were encountered: