How can I disable the textarea when I click on a radio button that is listed according to the information coming from a database. See below:
IwouldlikethatwhenyouclickNo,thejustificationtextareareferenced,wouldbedisabled.Theinitialcodelookslikethis:
while($jmListar=mysqli_fetch_object($sqlListar)){$listar.="<td>
<div class='radio-group'>
<label class='radio-label'>
<input name='Cancelar_$jmListar->IdCadastros' type='radio' checked='checked' value='S' id='sim'>
<span class='inner-label' style='color: #008000; font-weight: bold'>Sim</span>
</label>
<label class='radio-label'>
<input name='Cancelar_$jmListar->IdCadastros' type='radio' value='N' id='nao'>
<span class='inner-label' style='color: #F00; font-weight: bold'>Não</span>
</label>
</div>
</td>";
$listar .= "<td><textarea name='Justificativa_$jmListar->IdCadastros' class='form-control' id='justificativa' disabled></textarea></td>";
$listar .= "</tr>";
}