Remove class depending on the height of the site in the refresh?

0

I own a site with animation that starts as soon as the object on the screen is viewed. However, if I give F5 in the middle of the page, when raising the refresh avarés in the middle of the screen, the animation happens and should not ..

How can I remove the class from the div's, which makes the animation happen, if the load or refresh of the page is not at the top?

    
asked by anonymous 02.09.2014 / 19:35

1 answer

1

Use jquery in scroll events (see: link ) to find out what the scroll position is, then save browser cookies when the scroll is at the top of the page or when it is below the top, and then before running the animation on the refresh, you check the value of the cookie to see if it should or should not run.

    
02.09.2014 / 21:02