dojox/widget/Roller (version 1.10)

Summary

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.

Examples

Example 1

// create a scroller from a unordered list with id="lister"
var thinger = new dojox.widget.Roller.Roller({},"lister");

Example 2

// create a scroller from a fixed array, and place in the DOM:
new dojox.widget.Roller({ items:["one","two","three"] }).placeAt(dojo.body());

Example 3

// add an item:
dijit.byId("roller").items.push("I am a new Label");

Example 4

// stop a roller from rolling:
dijit.byId("roller").stop();

Property Summary

  • _idxIndex of the the currently visible item in the list of items[]
  • autoStartToggle to control starup behavior.
  • delayInterval between rolls
  • durationInSpeed (in ms) to apply to the "in" animation (show the node)
  • durationOutSpeed (in ms) to apply to the "out" animation (hide the showing node)
  • itemsIf populated prior to instantiation, is used as the Items over the children
  • itemSelectorA CSS selector to be used by dojo.query to find the children items in this widget.

Method Summary

Properties

_idx
Defined by: dojox/widget/Roller

Index of the the currently visible item in the list of items[]

autoStart
Defined by: dojox/widget/Roller

Toggle to control starup behavior. Call .start() manually if set to false

delay
Defined by: dojox/widget/Roller

Interval between rolls

durationIn
Defined by: dojox/widget/Roller

Speed (in ms) to apply to the "in" animation (show the node)

durationOut
Defined by: dojox/widget/Roller

Speed (in ms) to apply to the "out" animation (hide the showing node)

items
Defined by: dojox/widget/Roller

If populated prior to instantiation, is used as the Items over the children

itemSelector
Defined by: dojox/widget/Roller

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.

Methods

_Hover()
Defined by dojox/widget/Roller
_run()
Defined by dojox/widget/Roller
_setIndex(i)
Defined by dojox/widget/Roller

Set the Roller to some passed index. If beyond range, go to first.

Parameter Type Description
i undefined
_setupConnects()
Defined by dojox/widget/Roller

setup the loop connection logic

makeAnims()
Defined by dojox/widget/Roller

Animation creator function. Need to create an 'in' and 'out' Animation stored in _anim Object, which the rest of the widget will reuse.

postCreate()
Defined by dojox/widget/Roller
RollerSlide()
Defined by dojox/widget/Roller
start()
Defined by dojox/widget/Roller

Starts to Roller looping

stop()
Defined by dojox/widget/Roller

Stops the Roller from looping anymore.

Error in the documentation? Can’t find what you are looking for? Let us know!