1
I need to create masks for some inputs
that I have in the code, and had already asked about it, but I think the post was outdated and then was "forgotten". However what he had achieved with that post was:
HTML:
Within the <HEAD>
:
<script src="assets/plugins/jquery.maskedinput.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
Within the <BODY>
:
<input type="text" name="search" id="search" placeholder="Escreva o número de processo aqui..." required maxlength="5">
Javascript after </HTML>
:
<script type="text/javascript">
$(document).ready(function(){
$("#search").mask("99999");
});
and yet it doesn’t work. I’ve tried to create a new page to test this function but it didn’t work either. Anyone has any idea what’s going on?
You have to first load jquery, then Masked input and finally your Document.ready
– Rafael Mena Barreto
What do you mean? jquery, Voce is talking about libraries? then the script?
– programmer2016
This, take a look at the answer and try to change the order of loading the JS files
– Rafael Mena Barreto