Disable Animation using JavaScript

I would like to use JS code to disable an entire animation if it detects a cookie.

I have a loading animation (“loadingAnimation”) on my homepage that I’d like to use JS and cookies to only play once per day. I was able to get the custom code on the home page to hide the loading container, but my animation includes other elements not in the loading container, so the custom code only hides part of the animation.

I could change the animation and get rid of all the hide/show actions and give them to the custom code, but the animation includes my name logo (“LogoButton2”) which is in the header, and it has to animate it to a specific position and show/hide it at a specific time (I’m testing that (unsuccessfully) in “loading animation 2”). I’m not sure exactly how to do that, but I’m hoping there is an easy way to use JS to simply disable the entire animation if it detects the seenAnimation cookie.

Setting the style.display to “none” for the loadingContainer in the custom code doesn’t exactly work because it still runs through the animation, but just doesn’t show anything except the name logo. I’d like the website to go straight to the page and show the header, hero container, body container, and footer without any delays and without any animations, AS LONG AS the seenAnimation cookie has already been given and is not expired.

I’d also like to disable the animation on the Resume page (“Resume Bounce”) if it detects the seenAnimation cookie because that is just used to hint at the hover animations for a first-time visitor, so I’m hoping the same JS code can do that as well.

Let me know if you have any questions. Thank you.

Here is my site Read-Only: LINK
(how to share your site Read-Only link)