Enable/Disable Items

You can enable/disable items to the sidebar during the run time. The library will automatically refresh the portion of the sidebar that needs rebuilding. The example below demonstrates this feature.
$(function () { $('#sidebar').w2sidebar({ name: 'sidebar', nodes: [ { id: 'level-1', text: 'Level 1', img: 'icon-folder', expanded: true, group: true, nodes: [ { id: 'level-1-1', text: 'Level 1.1', icon: 'fa-star-empty' }, { id: 'level-1-2', text: 'Level 1.2', icon: 'fa-star-empty' }, { id: 'level-1-3', text: 'Level 1.3', icon: 'fa-star-empty' } ] } ] }); });