id()

Sets the element's ID using a given string.

Calling myElement.id() without an argument returns its ID as a string.

Examples

Syntax

id(id)
id()

Parameters

id
String:

ID of the element.

This page is generated from the comments in src/core/p5.Element.js . Please feel free to edit it and submit a pull request!

Related References