DOM structure handling

MethodDescriptionAvailable from version
BX.create Creation of DOM structure node.
BX.adjust Modifies properties of DOM structure node.
BX.addClass/BX.removeClass Adds/deletes CSS-class for a node
BX.findChild, BX.findChildren, BX.findParent, BX.findNextSibling, BX.findPreviousSibling Search feature package in DOM structure, matching by the specified parameters.
[link=654250]BX.toggleClass[/link] Toggles the availability/absence of CSS-class for DOM node or rotates CSS-classes as per the list.
BX.hasClass Checks CSS-class availability for DOM node. Retrieves and sets the current value of CSS-style for DOM node
BX.remove Deletes a DOM structure node.
BX.cleanNode Clears all child elements from the DOM structure node. node)/BX.hide(DOMNode node) Shows/hides a node.
BX.focus Focuses on an element.
BX.isNodeHidden Defines, whether the specified DOM element is hidden or not.
BX.scrollToNode Scrolls the window to the position to the specified element in the DOM structure.
BX.setOpacity Sets the level of transparency for a webpage element.
BX.setUnselectable/BX.setSelectable Those functions enable / disable the feature of user selection inside the passed element.
BX.width/BX.height Returns (or sets) the width, height of DOM element.
BX.selectUtils.* Handles the lists (select).
BX.toggle(DOMNode node) Shows, hides a DOM element.
BX.insertAfter(node, dstNode) Inserts a node right after the destination node.
  • node - new node
  • dstNode - destination node
BX.prepend(node, dstNode) Inserts a node in front of the destination node content.
  • node - new node
  • dstNode - destination node
BX.append(node, dstNode) Inserts a node at the end of the destination node content.
  • node - new node
  • dstNode - destination node

© «Bitrix24», 2001-2022