<script src="https://cdn.jsdelivr.net/jquery.validation/1.15.0/jquery.validate.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-nice-select/1.1.0/js/jquery.nice-select.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.12/js/intlTelInput.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.12/js/utils.min.js"></script>
<!-- Fully Custom Form Input Settings -->
<script>
setTimeout(function() {
$(document).ready(function() {
$('select').niceSelect();
});
var input = document.querySelector("#phone-50b7f28e-a5a6-4993-be0e-f9f62459f1ea");
var dialCode = document.querySelector(".dialCode"); var iti = intlTelInput(input, {
preferredCountries: ["us", "de", "uk", "jp", "kr"],
initialCountry: "auto",
localizedCountries: null,
placeholderNumberType: 'FIXED_LINE',
geoIpLookup: function(callback) {
$.get('https://ipinfo.io', function() {}, "jsonp").always(function(resp) {
var countryCode = (resp && resp.country) ? resp.country : "us";
callback(countryCode);
});
},
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.12/js/utils.min.js"
}); var updateInputValue = function (event) {
input.value = "+" + iti.getSelectedCountryData().dialCode;
};
input.addEventListener('countrychange', updateInputValue, false);
}, 500);
</script>