JSFiddle - React, Tailwind, and code Playground
HTML
<table id="anywhere_click">
<thead>
<tr>
<th>
<input type="checkbox" onclick="selectAll('myDataID[]');" />
</th>
<th>Title</th>
<th>Details</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="checkbox" name="myDataID[]" value="1" />
</td>
<td>Stackoverflow</td>
<td>Some text here....</td>
</tr>
<tr>
<td>
<input type="checkbox" name="myDataID[]" value="2" />
</td>
<td>Google</td>
<td> <a href="aaa.html">This is a Link</a>
<br />Some text here....
<br />
<img src="something.jpg" />
</td>
</tr>
<tr>
<td>
<input type="checkbox" name="myDataID[]" value="3" />
</td>
<td>test</td>
<td>Some text here....</td>
</tr>
</tbody>
</table>
JavaScript
$('tbody tr').click(function (e) {
if(!$(e.target).is('td input:checkbox'))
$(this).find('input:checkbox').trigger('click');
});
$('tr a').click(function (e) {
e.stopPropagation();
});