davidlpz/krakatoa — pull request #7 by o-slash (2014-03-21 14:20:19+00:00)
Title: Upgraded callback system. Added a 'reload' method to be used in callback...

First of all many thanks for this Krakatoa! I'd like to share some hopefully useful hacks I've done:

- a callback can now be passed as a function reference
- the callback receives a parameter referencing the current instance of the Krakatoa object
- a 'reload' method has been added to reinitialize the sliders from within a callback.

I used all of this as below to reinitialize sliders when browser resolution changes:

```javascript
$('.slider').krakatoa(
width : '100%'
, height : 'max'
, callback : function(slider) {
$( window ).on('resize', function() {
slider.reload();
});
}
);
```