id | string, id of the sidebar node |
let sidebar = new w2sidebar({
name : 'sidebar',
img : 'icon-page',
nodes: [
{ id: 'id-1', text: 'Level 1', hidden: true },
{ id: 'id-2', text: 'Level 2', expanded: false, nodes: [
{ id: 'id-2-1', text: 'Level 2.1' },
{ id: 'id-2-2', text: 'Level 2.2' }
]},
{ id: 'id-3', text: 'Level 3' }
]
});
xxxxxxxxxx
w2ui.sidebar.select('id-2-1');
w2ui.sidebar.expandParents('id-2-1');