I want to disable the reversed order of revealing when using interval
Author: alaaeddin2pCreated Dec 26, 2024Updated Dec 27, 2024
const fadeUp = {
distance: '50px',
origin: 'bottom',
opacity: 0,
}
const fadeDown = {
distance: '50px',
origin: 'top',
opacity: 0,
}
function scrollReveal_loader(_selector=null, _interval=200, _delay=200, _duration=750, _animationType=fadeUp, _reset=false) {
if (_selector !== null) {
const animationType = _animationType;
ScrollReveal().reveal(_selector, {
interval: _interval,
delay: _delay,
duration: _duration,
reset: _reset,
easing: 'ease-out',
...animationType,
viewFactor: 0.1,
});
}
}
scrollReveal_loader('.detailed-why-us-holder .card-style-2');
I am using version: 4.0.9
When I use interval: 100 for example and starting the page from bottom, I mean go to the bottom of the page refresh the page the browser will and you at the same scroll value now try to go up to reveal the animation will be revealed from bottom to top, I mean from element index 5 then 4 then 3 then 2 ... instead of 0,1,2,3,4,5, I don't want this behavior.
I tried default options without customize anything except adding interval time and same issue were faced.
Any solution or option to turn off reversed reveal with interval?
Source: jlmakes/scrollreveal