Using JQuery, I need to know if the User clicked on the link or third column, and need to get the value of the variable in the first column. How do I do this?
My html:
<div id="test">
<table id="tablex" cellpadding="0" cellspacing="0" border="0" class="display">
<thead>
<tr>
<th>Cod</th>
<th>Name completo</th>
<th> </th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>John Foster 1</td>
<td><img entity_id="1" class="image-selector" src='imagens/grid_cancel.png' title='' /></td>
</tr>
</tbody>
</table>
My jQuery:
$("#tablex tbody").on("click", "td", function(event){
alert($(this).text());
});