I am trying to add event onclick to a span added by DTColumnBuilder.
DTColumnBuilder
.newColumn('Invoice')
.withTitle('<span class="li-table-header">Invoice</span>')
.withOption('visible', true)
.renderWith(function (data, type, full) {
return `<span style="color: #337AB7;cursor:pointer">Download</span>`;
}),
when I try too add onclick (<span onclick="test()" .../span>) I am getting an error saying that test() is not defined even though I have defined test.