setmask is not a Function

Asked

Viewed 316 times

0

I’ve had a big problem for a long time script that always worked, but today this giving "setmask is not a Function". I will send the call to be analyzed, also the script but warning that it may be a little long...

<script type="text/javascript">
    $(document).ready(function() {
       $('#txtCpf').setmask('cpf');
    });
</script>

<script src="https://cdn.rawgit.com/fabiomcosta/jquery-meiomask/master/di‌​st/meiomask.js"></script>
<script type="text/javascript">
     $(document).ready(function() {
        $('#txtCpf').setmask('cpf');
     });
</script>
<form>
    <input type="text" name="cpf" id="txtCpf" placeholder="CPF:049.253.241-24"/>
    <button value="enviar">
</form>

Imagem do codigojuntamente ao erro..

chamada do script

  • Try changing the script URL to https://cdn.rawgit.com/fabiomcosta/jquery-meiomask/master/dist/meiomask.js. It will probably work, however, as the project no longer has maintenance, I suggest you copy the file(s) to a repository of yours

  • Strange friend is that it always worked.. now started from that mistake.. but I’ll try changing ... might be a problem for changing the jquery library...

  • But changing the URL worked?

  • No friend didn’t work... I tried everything changing position and even changing the library is strange because this script works on other systems...

  • I tested here the code snippet that you posted and worked smoothly (with the comment URL above). In Firefox the same error happens?

  • Type is strange friend because it happens only with this system, my other systems works smoothly in all browsers... and with firefox also does not work... @.@ friend some secret when Voce tested the excerpt of the code Voce did something has to post what Voce did ?

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.