I have an HTML table with several rows, each row has a radiobutton, I try to make each row like a link, that is to say that it changes color when it is selected and its radiobutton is selected to obtain the id associated with the radiobutton, I have only I could make each row of the table as a link How could I do it?
<script type="text/javascript">
$(".desmarcado").click(function () {
$("#intereses").prop("checked", true);
$(".desmarcado td").each(function (index) {
alert($(this).text());
});
});
</script>
and my table is this
<table id="table" class="table">
<thead>
<tr>
<th></th>
<th></th>
<!--<th></th>-->
</tr>
</thead>
<tbody>
<tr style='cursor:pointer' class='desmarcado'>
<td><input id="intereses" name="intereses" type="radio" value="1" /></td>
<td>Persona 1</td>
</tr>
</tbody>
</table>