I have a navigation bar in my wesite with a anchor element as toggle for side navigation bar.
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button" onclick="toggle_click()">
<span class="sr-only">Toggle navigation</span>
</a>
when i click the toggle the side navigation will hide/display.
there are dataTable in the content. those datatable columns are not auto resizing themselves when this toggle event is triggered.but the columns gets auto resized on other events like (zoom,window size change, any event on the datable like (search, changing the number of entries to display)).
so i want to know how to make this happen when the toggle is triggered.
i tried
function toggle_click() {
var mtable = $('#open_ticket_table').DataTable();
mtable.responsive.recalc();
}
function toggle_click() {
var mtable = $('#open_ticket_table').DataTable();
mtable.columns.adjust();
}
all the possible thigs in the internet