I using leaflet-sidebar-v2 and I'm wondering how can I change the attribute of a tab based on their id:
ctlSidebar = L.control.sidebar({container:'sidebar_div'}).addTo(mymap);
ctlSidebar.addPanel({
id: 'info',
tab: '<i class="fa fa-plus"></i>', // Font Awesome icon
title: 'info',
pane: 'some info'
});
sidebar.on('opening', function() {
//Change the 'tab' of ID == 'info' to '<i class="fa fa-minus"></i>';
})
sidebar.on('closing', function() {
//Change the 'tab' of ID == 'info' to '<i class="fa fa-plus"></i>';
})