jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers. React and Vue components are also included.
https://intl-tel-input.com
MIT License
7.59k stars 1.94k forks source link

Jquery support? #1677

Closed jrowe88 closed 3 months ago

jrowe88 commented 3 months ago

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

jackocnr commented 3 months ago

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 😉