shows the specified item
mode | boolean | (optional), if set to true - selects the item after showing, false 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").hide(); // hide a1 and select a2
// show item
mySidebar.items("a1").show(); // show a1, but a2 still selected
// or
mySidebar.items("a1").show(true); // show a1 and then select
Back to top