jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers. React and Vue components are also included.

Home Page:https://intl-tel-input.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jquery support?

jrowe88 opened this issue · comments

Hello- it appears that in Version 21.0.0, you removed the "legacy jquery support". For those of us who still use Jquery, is there a way to use this still?

Plugin version

v23.1.0

There's no longer a jQuery plugin, but there's nothing stopping you just using pure JavaScript! Don't be afraid, it's not that hard! Just switch from the following:

$("#phone").intlTelInput(options);

to the following:

const input = document.querySelector("#phone");
window.intlTelInput(input, options);

And follow the readme - you'll be fine 😉