Searches the page for all elements that matches the given CSS selector string.
The selector string can be an ID, class, tag name, or a combination. selectAll()
returns an array of p5.Element objects if it finds any matches and an empty array if none are found.
The second parameter, container
, is optional. It specifies a container to search within. container
can be CSS selector string, a p5.Element object, or an HTMLElement object.
Examples
Syntax
selectAll(selectors, [container])
Parameters
selectors
CSS selector string of element to search for.
container
CSS selector string, p5.Element, or HTMLElement to search within.
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!