I just found out that script tags inside DataTable table’s html structure is not executed.
jQuery v3.7.1
bootstrap v5.3.3
DataTable 2.1.4
I tried the following on the script tag within the table html structure:
<table class="dataTable ...">
<thead></thead>
<tbody>
<tr>
<td>
<div class="element"></div>
<script>
$(function() {
console.log("this log won't execute");
});
</script>
</td>
</tr>
</tbody>
</table>
I also tried the $(window).on("load")
it gets triggered as a warning.
You need to sign in to view this answers