vUX / ListScroller / v4.1.0
Hand ListScroller a <ul>, the element around it and your own two buttons.
It lays the list out in one scrollable row, moves it a step per press, and keeps each button's
inactive state matched to where the row really is, however it got there.
Every config property, live. ListScroller reads the step, the speed and the paddings on each
use, so those apply straight away. Swapping the inactive class or turning the buttons off also works on a
running scroller. offScroller() parks both buttons until onScroller().
The row is a real scroll area. Swipe it, use a trackpad or Shift + wheel, or drag the frame's corner to make it narrower. ListScroller measures the actual scroll position each time, so the buttons never claim there is more to see when there isn't. Items added later widen the row by themselves.
With config.hasButtons = false ListScroller only does the layout: one row, no wrapping, its
scrollbar hidden. Swiping, the trackpad and Shift + wheel still scroll it.
That suits a filter bar on a phone.
The constructor and the config setters throw on the spot and name what is wrong.
initialize() throws when the buttons or their inactive class are missing. Each button below
makes one of these mistakes on a scratch instance and prints what was thrown.
Pick a mistake above.