mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
add intlİnput
This commit is contained in:
parent
53ab93705f
commit
c2966c9116
@ -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);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user