While using datatables, row can be made clickable by javascript, eg:
$table.on('click', 'tr td', function (event) {
var rowData = table.row(this).data();
if (rowData) {
window.location = rowData.link
}
}
However, this differs from actually having <a>
-tags in one important and usability-sensitive way: in many browsers, <a>
-links allow users to open links in new tabs and see the url in advance, the right-click menu is totally different, for example, in Firefox.
Is there clever way to do the same in datatables, or is the only possible solution to put <a>
-tags around contents of each cell to have the rest of the link behavior?