How do I fire data-animation-out on exit, NOT delay?

1 reply · opened Oct 18, 2020

BBumgroupOct 18, 2020

I didn't see this attribute in the official documentation anywhere: data-animate-out but I noticed it when I was looking at the JS.

How do I make this fire when it's out of view and not just a delay? I want the opposite behavior of what the default is on all the Animate.css animations, which instead of animating when the user scrolls into view, I want them to animate when out of view.

I was trying to figure out how to modify the JS to only do them on exit by checking the location of view, but I couldn't get it.

Any ideas?

SSemicolon WebSTAFFOct 18, 2020

Hello,

Unfortunately, this functionality is not supported currently and requires Customization. We will surely consider adding this in Our Future Updates and will send you a Notification once this is available.

Meanwhile, you can consider changing the codes a bit. Find the following code in the js/plugins.animations.js File:
[ch_pre]if (entry.intersectionRatio > 0)[/ch_pre]

and replace it with:
[ch_pre]if ( ! entry.isIntersecting )[/ch_pre]

Hope this Helps!

If you are using the js/plugins.js or the js/plugins.min.js File, you will need to Update the above codes in these Files as well.

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard