Add and remove items from scrollable
This demo shows you how to add and remove scrollable items. Notice how the scrollable navigator grows and the next/prev buttons behave correctly.standalone demo
You can add items to a circular scrollable as well. This page's source code is identical to the minimal setup except that the add and remove buttons were added.
A new item
The item we are adding is the child element of DIV#newItem:
Every added item is a clone of a single DIV. We use addItem method from the Scrollable API to add new items. It takes one argument which is the new item.