Element.editAttributes

EditAttributes is a method of ClearlyHTML elements that allows editing the attributes of the element.

Parameters

  • element: HTML element to edit the attributes of

  • attributes: attributes to change

Returns

the ClearlyHTML element

More about the editAttributes function

pageeditAttributes

Examples

var a = clrly.new("h1", {}, "hello"); // Create a new element with clrly.new
a.editAttributes({innerHTML: "a text", style: "color: red"}); // Change the text to "a text" and the text's color to red

Last updated