Inputmask
Inputmask copied to clipboard
Uncaught TypeError: inputmask is not a function
The snippet below gave me "Uncaught TypeError: $(...).inputmask is not a function" error.
$(document).ready(function () {
$("#phone").inputmask("(999) 999-9999 x99999");
});
When I change it as below, it works fine.
$(document).ready(function () {
var im = new Inputmask("(999) 999-9999 x99999");
im.mask("#phone");
});
I imported all required JS in a right order. Could you tell me what I did wrong?
- OS: Windows 10
- Browser: Chrome Version 120.0.6099.110 (Official Build) (64-bit)
- Inputmask version: 5.0.8
Thanks!
Can you remove thé import of inputmask.js.