toggle()
/**
* @param {Mixed} item
* @param {Boolean} bool
* @return {Boolean}
*/
selectable.toggle(choice, bool)
Toggles the state of the given item(s)
The first argument is the item(s) you want to toggle:
HTMLElement
HTMLCollection
NodeList
Number
- the index of the selectable element in theitems
arrayObject
- a reference to theitem
stored in theitems
arrayArray
- an array ofHTMLElement
, indexes or item references
The second optional argument accepts a boolean
to force the selected state.
Last updated