I'd like to highlight the cell content on focus/click on it. For example I would something like
<input onclick="this.select()"/>
on my DataTable. How can I do that?
I'd like to highlight the cell content on focus/click on it. For example I would something like
<input onclick="this.select()"/>
on my DataTable. How can I do that?
From the documentation...
JS Code:
$(document).ready(function() {
$('#example').DataTable( {
select: {
style: 'os',
items: 'cell'
}
} );
} );
Load the following JQ libraries:
https://code.jquery.com/jquery-1.12.4.js
https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js
https://cdn.datatables.net/select/1.2.5/js/dataTables.select.min.js
Load the following libraries for CSS:
https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css
https://cdn.datatables.net/select/1.2.5/css/select.dataTables.min.css