An open API service indexing awesome lists of open source software.

https://github.com/one-com/knockout-bottomsup

Knockout.js binding that keeps an element scrolled to the bottom
https://github.com/one-com/knockout-bottomsup

Last synced: 8 months ago
JSON representation

Knockout.js binding that keeps an element scrolled to the bottom

Awesome Lists containing this project

README

          

A Knockout.js binding for keeping an element bound to an observable array scrolled to the bottom.

[Click here to see an example](http://one-com.github.io/knockout-bottomsup/examples/)

Usage:

```html


  • ...


```

Whenever `myObservableArray` changes, the `

    ` will be scrolled to the bottom if it was at the bottom before the change. Thus the user can turn off the behavior by scrolling the element up.

    If you want to prune the array while the element is scrolled to the bottom, use the `trim` option to specify the maximum number of items to retain:

    ```html


    • ...


    ```

    This is useful for logs that you don't want to grow infinitely.

    ## License

    Knockout.dragdrop is licensed under a standard 3-clause BSD license -- see the `LICENSE` file for details.