toggle()
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