# dhtmlxmenu:api_method_dhtmlxmenuobject_addnewsibling [DHX documentation]

DHTMLX Docs & Samples Explorer

Index
dhtmlxmenu
API Methods

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

Required library edition:
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);