Class Rico.SelectionSet
Defined in: <ricoBehaviors.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Rico.SelectionSet(selectionSet, options)
|
| Method Attributes | Method Name and Description |
|---|---|
|
add(item)
|
|
|
click(event, target)
|
|
|
notifySelected(element)
|
|
|
remove(item)
|
|
|
reset()
|
|
|
select(element)
|
|
|
selectIndex(index)
|
|
Class Detail
Rico.SelectionSet(selectionSet, options)
- Parameters:
- selectionSet
- collection of DOM elements (or a CSS selection string)
- options
- object may contain any of the following:
- selectedClass
- class name to add when element is selected, default is "selected"
- selectNode
- optional function that returns the element to be selected
- onSelect
- optional function that gets called when element is selected
- onFirstSelect
- optional function that gets called the first time element is selected
- noDefault
- when true, no element in the set is initially selected, default is false
- selectedIndex
- index of the element that should be initially selected, default is 0
- cookieName
- optional name of cookie to use to remember selected element. If specified, and the cookie exists, then the cookie value overrides selectedIndex.
- cookieDays
- specifies how long cookie should persist (in days). If unspecified, then the cookie persists for the current session.
- cookiePath
- optional cookie path
- cookieDomain
- optional cookie domain
Method Detail
add(item)
- Parameters:
- item
click(event, target)
- Parameters:
- event
- target
getCookie()
nextSelectItem()
notifySelected(element)
- Parameters:
- element
remove(item)
- Parameters:
- item
removeAll()
reset()
select(element)
- Parameters:
- element
selectIndex(index)
- Parameters:
- index
selectNext()