dan-silver/ElementTransitions.js — pull request #2 by manuelvanrijn (2013-07-09 09:34:50+00:00)
Title: Cleanup and callback

I've made some modification that might be interesting

1. I've modified the code formatting because I found it hard to read. I hope you do not mind.
2. Added a callback for the `animate` method so that we know when the animation finished.

**example**

```javascript
PageTransitions.animate("#target", function(block, $nextPage, $currPage) {
//
});
```

3. Added the `gotoPage` method so that we can transition from page 1 to page 3 for example

**examples**

```javascript
// by index
PageTransitions.animate("#target", 1);
// by selector
PageTransitions.animate("#target", "#page-1");
```