add intlİnput

This commit is contained in:
vedatakd 2020-01-31 19:03:50 +03:00
parent 53ab93705f
commit c2966c9116

View File

@ -3,3 +3,18 @@
// Go!
})(window, document);
var inputQuery = document.querySelector("input[name=\"phone\"]");
var iti = intlTelInput(inputQuery, {
hiddenInput: "full_phone",
class:"form-control",
initialCountry: "auto",
geoIpLookup: function (success, failure) {
$.get("https://ipinfo.io", function () {
}, "jsonp").always(function (resp) {
var countryCode = (resp && resp.country) ? resp.country : "";
success(countryCode);
});
}
});