Documentation

BX.adjust

Description format is the same as for the [link=654222]BX.create[/link]. But without tag.
DOMNode 
BX.adjust(
 DOMNode node, 
 object data
);

The function allows to change properties of the node.

Function parameters

Parameter Description
data Descriptive object, can have the following fields:
  • node: link to the modified node,
  • props: additional properties, for example, className,
  • style: node styles,
  • events: node event handlers,
  • attrs: for main fields (it is a only way to specify data-* attributes),
  • children: array of child nodes, optional
  • text: node text message,
  • html: node HTML-content

Note: The last 3 parameters are mutually incompatible.



© «Bitrix24», 2001-2024