removes the specified item
actvId | string|number|boolean | (optional) if the specified item is selected, selects another item, true by default |
// init sidebar
var mySidebar = new dhtmlXSideBar({
parent: "sidebarObj",
template: "details",
icons_path: "icons/16x16/",
width: 160,
items: [
{id: "a1", text: "Item 1", icon: "image1.png", selected: true},
{id: "a2", text: "Item 2", icon: "image2.png"},
{id: "a3", text: "Item 3", icon: "image3.png"}
]
});
mySidebar.items("a1").remove(); // remove a1 and select a2
// or
mySidebar.items("a1").remove("a3"); // remove a1 and select a3
// or
mySidebar.items("a1").remove(false); // remove a1 and do not select any item
Back to top