A simple widget to take an unordered-list of Text and roll through them
The Roller widget takes an unordered-list of items, and converts them to a single-area (the size of one list-item, however you so choose to style it) and loops continually, fading between items.
In it's current state, it requires it be created from an unordered (or ordered) list, though can contain complex markup.
You can manipulate the items
array at any point during the cycle with
standard array manipulation techniques.
The class "dojoxRoller" is added to the UL element for styling purposes.
See the dojox/widget/Roller reference documentation for more information.
// create a scroller from a unordered list with id="lister" var thinger = new dojox.widget.Roller.Roller({},"lister");
// create a scroller from a fixed array, and place in the DOM: new dojox.widget.Roller({ items:["one","two","three"] }).placeAt(dojo.body());
// add an item: dijit.byId("roller").items.push("I am a new Label");
// stop a roller from rolling: dijit.byId("roller").stop();
Toggle to control starup behavior. Call .start() manually
if set to false
Speed (in ms) to apply to the "in" animation (show the node)
Speed (in ms) to apply to the "out" animation (hide the showing node)
If populated prior to instantiation, is used as the Items over the children
A CSS selector to be used by dojo.query
to find the children
items in this widget. Defaults to "> li", finding only first-children
list-items in the list, allowing for embedded lists to occur.
Set the Roller to some passed index. If beyond range, go to first.
Parameter | Type | Description |
---|---|---|
i | undefined |
Animation creator function. Need to create an 'in' and 'out' Animation stored in _anim Object, which the rest of the widget will reuse.