Scroll to top

Events Calendar

May 2016

Sun Mon Tue Wed Thu Fri Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
19
20
21
22
23
25
26
27
28
29
30
31
1
2
3
4

document.addEventListener('DOMContentLoaded', function () { document.querySelectorAll('table.tablepress').forEach(table => { // Wrap table in responsive div if not already if (!table.parentElement.classList.contains('tablepress-responsive')) { const wrapper = document.createElement('div'); wrapper.classList.add('tablepress-responsive'); table.parentNode.insertBefore(wrapper, table); wrapper.appendChild(table); } // Generate data-th attributes for stacked view const headers = Array.from(table.querySelectorAll('thead th')).map(th => th.textContent.trim()); table.querySelectorAll('tbody tr').forEach(row => { Array.from(row.children).forEach((cell, i) => { cell.setAttribute('data-th', headers[i] || ''); }); }); }); });