I'm trying to make clicking button
btnEditar
free inputs
: funcionário
, rca
and regiao
... I used this script but it did not work:
<script language='JavaScript'>
$('document').on('click','#btnEditar', function(){ $(input[name="funcionario"]).removeAttr('readyonly'); $(input[name="rca"]).removeAttr('readyonly'); $(input[name="regiao"]).removeAttr('readyonly'); });
</script>
These are the inputs and the button
:
<div class='form-group'>
<div class='col-xs-12'><center>
<label for='exampleInputPassword1'>Funcionário</label></center>
<input type='text' name='funcionario' class='form-control' id='exampleInputPassword1' value=".$row['funcionario']." style='text-align: center;' readonly='readonly' >
</div>
</div>
<div class='form-group'>
<div class='col-xs-12'><center>
<label for='exampleInputPassword1'>RCA</label></center>
<input type='text' name='rca' class='form-control' id='exampleInputPassword1' value=".$row['rca']." style='text-align: center;' readonly='readonly' >
</div>
</div
<div class='form-group'>
<div class='col-xs-12'><center>
<label for='exampleInputPassword1'>Região</label></center>
<input type='text' name='regiao' class='form-control' id='exampleInputPassword1' value=".$row['regiao']." style='text-align: center;' readonly='readonly' >
</div>
</div
<div class='form-group'>
<div class='col-xs-6'>
<button type='button' class='btn btn-default btn-lg btn-block' role='button' id='btnEditar'><span class='glyphicon glyphicon-pencil'></span> Editar</button>
</div>
</div>
I click and do nothing. This form is in a modal if this information is important.