Inputmask icon indicating copy to clipboard operation
Inputmask copied to clipboard

Uncaught TypeError: inputmask is not a function

Open Jing-GitH opened this issue 2 years ago • 1 comments

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!

Jing-GitH avatar Dec 22 '23 02:12 Jing-GitH

Can you remove thé import of inputmask.js.

RobinHerbots avatar Dec 30 '23 09:12 RobinHerbots