I am currently using NEOS CMS and on my site there are a lot of tables which are added by editors directly using the backend and no code is needed. The table are now needed to be sortable via the jquery datatable plugin. The problem is that the plugin requires the table to have a thead tag to identify table headers. Like below
<table>
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
</thead>
<tbody>
<tr>
<td>Data1</td>
<td>Data2</td>
</tr>
<tbody>
</table>
But the NEOS CMS creates table in the follwing format
<table>
<tbody>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
<tr>
<td>Data1</td>
<td>Data2</td>
</tr>
<tbody>
</table>
Hence the jQuery is not able to find the thead and doesn't work. My question is, is there any workaround for this problem in the plugin so it works with the format. Or any other javascript library which does everything like datatables ?
Thanks in advance.