Slider out of view start automatically

I’m making a custom slider, with custom in and out animations. But since my second slide is technically out of view, it starts the animation on slide two right away.

How can i avoid this?

Here is my public share link:

how to access public share link: