No description, website, or topics provided.
CoffeeScript JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
bower.json
build
scroll_animation.coffee
scroll_animation.js
scroll_animation.map

README.md

Good™ Scroll Animations

Good-as-hell scroll animations.

Usage

Create your animation by specifiying the target element an animation function:

var animation = new ScrollAnimation({
  el: document.body,
  animation: function(scrollTop, windowHeight, documentHeight) {
    // Do stuff...
  }
});

And register your new animation:

ScrollAnimation.register(animation);

You can register as many animations as you like. Finally you need to tell ScrollAnimation to begin, typically you'd want to do this on DOMReady or window load:

ScrollAnimation.start();

Hell yeah!

Animations can also remove themselves so they're no longer called. You might opt to do this once an animation is complete:

ScrollAnimation.remove(animation);

Installation

Browser

Simply include scroll_animation after jQuery:

<script src="/javascripts/scroll_animation.js"></script>

Bower

bower install scroll_animation