I have a quick jQuery question:
I have the following type of table:
<table id="my_table">
<tr>
<td><input type="checkbox" value="24"></td>
<td> Click Here To Check The Box </td>
<td> Or Click Here </td>
</tr>
</table>
And in jQuery, I am attempting to select the corresponding checkbox in that row that was clicked.
$("#my_table tr").click(function(e) {
$(this).closest(":checkbox").attr("checked", checked");
});
But the above isn't working. Any quick ideas on selecting the checkbox on the row that was clicked? Thanks!