Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: inputmask is not a function #2764

Open
Jing-GitH opened this issue Dec 22, 2023 · 1 comment
Open

Uncaught TypeError: inputmask is not a function #2764

Jing-GitH opened this issue Dec 22, 2023 · 1 comment

Comments

@Jing-GitH
Copy link

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?
Imported JS

  • OS: Windows 10
  • Browser: Chrome Version 120.0.6099.110 (Official Build) (64-bit)
  • Inputmask version: 5.0.8

Thanks!

@RobinHerbots
Copy link
Owner

Can you remove thé import of inputmask.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants