julianlam/Scrollable — pull request #13 by afoeder (2012-03-02 07:53:51+00:00)
Title: Event delegation, public methods for remote controlling

This patch enables additional methods for observing
the content inside the scrollable area, i.e. a correct
recalculation and repositioning if inside-content changes.
Additionally it provides (public) convenient methods that allow scrolling the content to top or bottom stop and recalculating the knob if the scroll position has modified.
An Event delegation allows it to notify the Scrollable class if content has been changed, aditionally it emits an event on its own if that happens. Using this you can, for example,

```javascript
new Scrollable(element, {
// if the content height changes, it should scroll to the bottom
onContentHeightChange: function(){ this.scrollBottom(); }
});
```