Commit fe534c56 authored by Sven Lautenbach's avatar Sven Lautenbach
Browse files

top scroller for data table

parent 91d20929
......@@ -307,9 +307,20 @@ function populateDataTable(geojsonData, tableDivID) {
} );
var table = $('#'+tableDivID).DataTable({
"scrollX": true
"scrollX": true,
scroller: true
}
);
// Put top scroller
$('.dataTables_scrollHead').css({
'overflow-x':'scroll'
}).on('scroll', function(e){
var scrollBody = $(this).parent().find('.dataTables_scrollBody').get(0);
scrollBody.scrollLeft = this.scrollLeft;
$(scrollBody).trigger('scroll');
});
$('.dataTables_length').addClass('bs-select');
// Apply the search
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment