Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- jQuery(document).ready(function(){
- // #input_1_1 is id of the input with flags
- const telInput = document.querySelector("#input_1_1");
- telInput.addEventListener("countrychange", function(e) {
- const selectedCountryData = jQuery(telInput).intlTelInput('getSelectedCountryData');
- console.log(selectedCountryData);
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement