mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
16 lines
588 B
JavaScript
16 lines
588 B
JavaScript
// Personal Registration
|
|
var inputQueries = document.querySelectorAll("input[name=\"phone\"]");
|
|
inputQueries.forEach(function (inputQuery, key) {
|
|
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);
|
|
})
|
|
}
|
|
})
|
|
}); |