Initial commit
This commit is contained in:
13
assets/js/main.js
Normal file
13
assets/js/main.js
Normal file
@@ -0,0 +1,13 @@
|
||||
window.onload = wrapTable();
|
||||
|
||||
// Wrap tables in a div so that they scroll responsively.
|
||||
function wrapTable() {
|
||||
const tables = document.querySelectorAll('table');
|
||||
tables.forEach((table) => {
|
||||
const tableWrapper = document.createElement('div');
|
||||
tableWrapper.className = 'table-wrapper';
|
||||
table.parentElement.replaceChild(tableWrapper, table);
|
||||
tableWrapper.appendChild(table);
|
||||
});
|
||||
};
|
||||
|
Reference in New Issue
Block a user