<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" href="build/css/intlTelInput.css">

    <title>Document</title>

</head>

<body>

    <input type="text" id="telephone" name="telephone">

    <button>test</button>

    <script src="plugins/jquery/jquery.min.js"></script>

    <script src="plugins/jquery-validation/jquery.validate.min.js"></script>

    <script src="plugins/jquery-validation/additional-methods.min.js"></script>

    <script src="build/js/intlTelInput.js"></script>

    <script>

        var input = document.querySelector("#telephone");

        var iti=window.intlTelInput(input, {

      // allowDropdown: false,

      // autoHideDialCode: false,

      // autoPlaceholder: "off",

      // dropdownContainer: document.body,

      // excludeCountries: ["us"],

      // formatOnDisplay: false,

      // geoIpLookup: function(callback) {

      //   $.get("http://ipinfo.io", function() {}, "jsonp").always(function(resp) {

      //     var countryCode = (resp && resp.country) ? resp.country : "";

      //     callback(countryCode);

      //   });

      // },

       hiddenInput: "full_number",

       initialCountry: "cd",

      // localizedCountries: { 'de': 'Deutschland' },

       nationalMode: false,

      // onlyCountries: ['us', 'gb', 'ch', 'ca', 'do'],

      // placeholderNumberType: "MOBILE",

      preferredCountries: ['cd','us','fr','uk','et'],

      separateDialCode: true,

      utilsScript: "build/js/utils.js",

    });

    $(function(){

        alert($('button').text())

        $('button').click(function(){

            alert(iti.getNumber())

        })

    })

    </script>

</body>

</html>