julianshapiro/velocity — pull request #22 by jeffmicklos (2014-05-01 20:01:44+00:00)
Title: Add support for custom user sequences

PR for changes as that were brought up in Issue #20 (https://github.com/julianshapiro/velocity/issues/20).

In summation, this change set adds support for user-defined animation sequences. This has proved to be a huge win, as I am porting all of our `animation` calls to `velocity`. We reuse a lot of specific animations and having short-hand access to them is, to put it lightly, life changing. An example of a custom defined sequence would be:

```
$.velocity.Sequence.fadeOut = function(options) {
var options = options || {};
var defaults = {
opacity: 0
};

return jQuery(this).velocity(
$.extend(defaults, options),
{display: 'none'}
);
};
```

Now I can just do `$('div').velocity('fadeIn')`. Awesome. What's even better is we can all imagine a world in which sequences do crazy awesome things beyond just fading in elements.