Skip to main content

ElementSetDataAttribute

Callable

  • ElementSetDataAttribute(ID: string, Name: string, Value: string): void

  • Sets a custom data-attribute to a specified value on a specified element


    Parameters

    • ID: string

      The id of the element to create/set the data attribute of.

    • Name: string

      Name of the data attribute. ("data-" will be automatically appended to it.)

    • Value: string

      Value to give to the attribute.

    Returns void

    • Nothing