I have two checkbox
different in the same column of the table, but both have different names and values.
<td align="center">
<input type="checkbox" id="chkSiapeServidor" name="chkSiapeServidor"/>
<input type="checkbox" id="chkIdUnidadeAnterior" name="chkIdUnidadeAnterior"/>
</td>
When I load the page, I check if a hidden
is populated and if it is positive, the hidden
value in the checkbox. I use this code:
if($('#siapeServidor').prop('value')) {
$(this).find('td input[type=checkbox][name=chkSiapeServidor][value='+$('#siapeServidor').prop('value')+']').prop('checked', true);
}
How do I mark the checkbox
that is at the same level as the referenced, and how to reference the tr
parent of the td
where they are located?