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

https://github.com/jackfallows/knockout-remainingheight

Knockout binding for setting an element's height to be the remaining available in its parent, based on the parent's current height and the sum of the heights of the element's siblings.
https://github.com/jackfallows/knockout-remainingheight

Last synced: over 1 year ago
JSON representation

Knockout binding for setting an element's height to be the remaining available in its parent, based on the parent's current height and the sum of the heights of the element's siblings.

Awesome Lists containing this project

README

          

# knockout-remainingheight
## Description
Knockout binding for setting an element's height to be the remaining available in its parent, based on the parent's current height and the sum of the heights of the element's siblings.

## Installing
To install, use Bower:

`bower install --save knockout-remainingheight`

## Using
### Include in your page
``

### Use the binding
To use, the element's parent must have a defined height (so that it doesn't simply end up the height of its children). Then:

```


...

```

You can also bind to an observable which will trigger recalculations of the element height on changes (useful if a user action causes new sibling elements to appear, or existing ones to disappear):

```


...

```