I have implemented a stunning animation to the h1 element using a function, but now I want the animation to trigger only when the h1 element enters the viewport as the user scrolls down.
Currently, the animation occurs as soon as the page is loaded, even before the user gets to that section.
My goal is for the animation to play dynamically and precisely when the h1 element becomes visible on the screen.