jqDoubleScroll icon indicating copy to clipboard operation
jqDoubleScroll copied to clipboard

How to refresh the scrollbars?

Open MrLaursen opened this issue 5 years ago • 1 comments

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'); });

MrLaursen avatar Mar 21 '19 00:03 MrLaursen