views:

12

answers:

0

I'm on the lookout for a javascript list widget that expands and contracts to fill as much as possible of the viewport with the entries contained in it, but no more than that they all can be displayed in their entirety.

Eg, if you have a list that looks like this (where they dark grey is viewport size),

alt text

I'd like the list to be rendered like this, truncating the last two entries.

alt text

If I resize the viewport, it should update accordingly.

There should preferably be some method to get at which items are currently being displayed (indices, id's, …)

Right now I have my own widget for this, but it is riddled with problems and the code is messy beyond belief. I was wondering if there exists something already out there for this?