scrollTableColumnWidth();
$(window).resize(function() {
scrollTableColumnWidth();
});
function scrollTableColumnWidth() {
let cell,
tableArr = document.getElementsByClassName('scrollTable'),
tableBodyWidth,
tableHeadingCellArr,
totalWidth;
for (let tableIndex = 0; tableIndex < tableArr.length; tableIndex++) {
tableHeadingCellArr = [];
totalWidth = 0;
$(tableArr[tableIndex]).find('th').each(function(i, el) {
tableHeadingCellArr.push(this);
});
for (let i = 0; i < tableHeadingCellArr.length - 1; i++) {
cell = $(tableArr[tableIndex]).find('tr:last').find('td').eq(i);
$(tableHeadingCellArr[i]).outerWidth($(cell).outerWidth(true));
totalWidth += $(cell).outerWidth(true);
}