shama/jmpress.js — pull request #6 by sokra (2012-01-23 18:08:15+00:00)
Title: allow multiple callback handlers

here ist some small change.

This tweek allows multiple handlers to be attached to a callback/event.
It also allows handlers to be attached before init is called. This will add a simple plugin feature. (More events are required to create useful plugins. I will add these if this commit is merged in)

Some sample code:

``` javascript
// some kind of plugin
$.jmpress( 'beforeChange', function( slide ) {
// do some cool stuff
});
$("#jmpress").jmpress(...);
$("#jmpress").jmpress( 'beforeChange', function( slide ) {
// Handler 1
});
$("#jmpress").jmpress( 'beforeChange', function( slide ) {
// Handler 2
});
```