DHTMLX Docs & Samples Explorer

addNewSibling(nextToId, itemId, itemText, disabled, imgEnabled, imgDisabled)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxmenu.js

adds a new sibling item

  • nextToId - id of the element after which a new one will be inserted
  • itemId - id of a new item
  • itemText - text of a new item
  • disabled - true|false, whether the item is disabled or not
  • img - image for the enabled item
  • imgDis - image for the disabled item
    menu.addNewSibling(nextToId, itemId, itemText, disabled, imgEnabled, imgDisabled);