0
I’m trying to put mask on my inputs, I think I’ve called the necessary files, but it’s not working.
Archives:
<script type="text/javascript" src="http://localhost/sprodoc-bootstrap/bootstrap/js/inputmask.js">
<script type="text/javascript" src="http://localhost/sprodoc-bootstrap/bootstrap/js/jquery.inputmask.js"></script>
JS:
<script type="text/javascript">
$(document).ready(function(){
$("input.fdatepicker").inputmask("99/99/9999");
$("input.cpf").inputmask("999.999.999-99");
$("input.telefone").inputmask("(99) 9999-9999");
});
INPUT:
<div class="form-group">
<label>CPF</label>
<input type="text" name="cpf" value="<?php echo set_value('cpf')?>" class="form-control cpf" placeholder="Cpf">
NOTE: I am using the Bootstrap framework
What difference between files
bootstrap/js/inputmask.js
andbootstrap/js/jquery.inputmask.js
? And where are you loading jQuery itself? You can make a jsFiddle that reproduces the problem?– Sergio
I downloaded on this site https://github.com/RobinHerbots/jquery.inputmask the package that comes with jquery.inputmask and inputmask. I am using Jquery (jQuery v1.11.3 ) . I think there is nothing missing to call.
– Andrew Maxwell