Commit ef4fe133 authored by José Fernando Mendes da Costa's avatar José Fernando Mendes da Costa
Browse files

carrega macara do cpf quando a página é carregada

No related merge requests found
Showing with 4 additions and 21 deletions
+4 -21
......@@ -43,7 +43,7 @@
<div class="form-row d-flex">
<label for="cpf_consulta">CPF:</label>
<input type="text" id="cpf_consulta" name="cpf_consulta" class="form-control" onkeyup="mask_cpf();">
<input type="text" id="cpf_consulta" name="cpf_consulta" class="form-control">
</div>
<div class="form-row d-flex" style="margin-top:10px">
......@@ -135,26 +135,9 @@
<script>
function mask_cpf() {
$("#cpf_consulta").keydown(function(){
try {
$("#cpf_consulta").unmask();
} catch (e) {}
$("#cpf_consulta").mask("999.999.999-99");
// ajustando foco
var elem = this;
setTimeout(function(){
// mudo a posição do seletor
elem.selectionStart = elem.selectionEnd = 10000;
}, 0);
// reaplico o valor para mudar o foco
var currentValue = $(this).val();
$(this).val('');
$(this).val(currentValue);
});
}
$(document).ready(function () {
$("#cpf_consulta").mask("999.999.999-99");
});
function removerIntegrante(id) {
$(`#integrante${id}`).remove()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment