Capítulo 146 de 411
toArray() converts selector text, a NodeList, a single object, or any array-like structure into a flat real Array.
| Parameter | Type | Description |
|---|---|---|
value | String | Array | Object | NodeList | what to convert |
scope | Element | (3.7.0+) limits selector-text results to descendants of this element |
gsap.utils.toArray(".class"); // Array of matched elements
gsap.utils.toArray(myElement); // Array containing just that one element