jqDoubleScroll
jqDoubleScroll copied to clipboard
How to refresh the scrollbars?
I'm building a dynamic table based on JSON-data adding and removing columns to my table. Is there any way to refresh the scrollbars after the table content is loaded?
I added $('#double-scroll').doubleScroll({resetOnWindowResize: true});
that works fine if browser window is adjusted so I thought it could help using $('.double-scroll').trigger('resize.doubleScroll');
after the data is loaded without any luck.
HTML:
<div id="double-scroll" class="table-responsive">
<table class="table table-hover small" id="tbl-contacts">
<thead></thead>
<tbody></tbody>
</table>
</div>
Script:
$(document).ready(function() {
$('#double-scroll').doubleScroll({resetOnWindowResize: true});
loadContent();
$('.double-scroll').trigger('resize.doubleScroll');
});