Targets
CSS Selector
Can be any CSS selector.
Pseudo elements can't be targeted using JavaScript.
| Type | Default | Example |
| String | null |
targets: '.item' |
DOM Node / NodeList
Can be any DOM Node or NodeList.
| Type | Default | Example |
| DOM Node | null |
targets: el.querySelector('.item') |
| NodeList | null |
targets: el.querySelectorAll('.item') |
JavaScript Object
A JavaScript Object with at least one property containing a numerical value.
| Type | Default | Example |
| Object | null |
targets: myObjectProp |
{"charged":"0%","cycles":120}
Array
An array containing multiple targets.
Accepts mixed types. E.g. ['.el', domNode, jsObject]
| Type | Default | Example |
| Array | null |
targets: ['.item', el.getElementById('#thing')] |