Uses Intersection observer to show cool animation when the element is scrolled on screen
- save and load textAnimation.css (in head) and textAnimation.js (at end of body) in your html file
- add class
text-wipe-in-parts
to parent element inside which words(to be animated) are present. It finds the words using regex so it does not matter whether parent element contains child elements or not.
- save and load animateOnScroll.css (in head) and animateOnScroll.js (at end of body) in your html file
- add class
fade-on-scroll
to element which needs to be animated. - add
data-fromdirection
attribute of the same element with value one of"bottom"
,"top"
,"left"
,"right"