0

I am creating a simple webpage that animates as the user scrolls down. For an example, click here.

Obviously, I know that Superscrollorama exists. It looks to have fantastic features, yet it's still rather confusing to a novice jQuery user like myself.

So I would like to keep to simple stuff. Here is the code I have made for sliding in a div. This code only works on page load, and I couldn't find how to execute the function when the element comes in to the browser viewport.

$(document).ready(function() {
    $('.slide').slideDown('slow');
});

How can I get this animation to occur only when the element is scrolled to? Can I reverse this animation once the element is once again out of view? Is it better to just go figure out Scrollorama than deal with this?

Alexander Lozada
  • 4,019
  • 3
  • 19
  • 41

0 Answers0