aos
aos copied to clipboard
AOS Modify to allow element to disappear when not in viewport regardless of above or below
We all know once an aos element is visible in the viewport the aos-animate class is given and the element animates, and when you scroll back up and it leaves the viewport the class is removed. I'd like to also include that if you scroll below, it also disappears so regardless of what direction you scroll in, once the element leaves the viewport the aos-animate class is removed. I can't find any helpful or working solution including a data attribute to make this work. Any ideas?
Have you been able to resolve this issue? I'm having a same problem it animates only when I'm scrolling down however when I scroll up it stays static.
Use the aos 3.0 beta, the feature isn't supported in the latest release version (pretty sure it's 2.3.1). Then just add the attribute data-aos-mirror="true"
and it should work perfectly. Obviously using a beta version could cause problems, but I haven't encountered any or other major changes while using it.