The first requirement is to make a table row behave like a clickable link.
Various good sources pointed out you had to use javascript to achieve this, I chose this one Make table row clickable
Which uses jQuery and the link-data attribute in the TR tag.
However, I was hoping to make any < a > tag links within the TD cells to work normally as well. The desired result being if you click on a link in the table it works normally, but if you click anywhere else on the TR it goes to link-datas url.
This is what I currently have, but any click anywhere on the row, link or not goes to the data-link address.
$("tr[data-link]").click(function() {
window.location = this.dataset.link;
});
<tr class="clickable-row" data-link="/invoices/10">
<td>6</td>
<td>2014-06-09</td>
<td></td>
<td>£343,242.00</td>
<td>£68,640.00</td>
<td><a href="/jobs/770">0453</a></td>
</tr>
I was thinking some sort of check in the jQuery/Javascript