When i apply dataTables functionality on a given table and want it to be selecteable, i perform the following:
var table = $('#table').DataTable( {
select: true
});
Which is working fine on the first table on the same site. However, when i try to have a second selecteable table, it just won't select on click. It shows the info message "click to select", though.
I have loaded the dataTables.select.min.js file, after loading the dataTables.js itself. (It works on the first table on the site, even without loading the dataTables.select.min.js, but i wanted to be sure..)
I also tried to apply table.select() after initialization, it does not work either.
Any ideas on why this isn't working properly?
DataTabels version is 1.10.16, select version is 1.2.3
Edit: My second table is being build on a button click, asynchronuosly via ajax call to get the data, and then using js .innerHTML to actualy build the DOM for the second table. So maybe the problem is, that i do not apply the datatables functionality for the second table on $(document).ready, as i do not have the option to do so?
#tableid - if so that's the problem. Use a class to select multiple elements as ids must be unique