International Telephone Numbers
Compiled and production-ready code can be found in the dist
directory.
Direct Download
You can download the files directly from GitHub.
<link type="text/css" rel="stylesheet" href="dist/aksTelephoneInput.min.css">
<script src="dist/aksTelephoneInput.min.js"></script>
CDN
<link type="text/css" rel="stylesheet" href="https://unpkg.com/[email protected]/dist/aksTelephoneInput.min.css">
<script src="https://unpkg.com/[email protected]/dist/aksTelephoneInput.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/aksTelephoneInput.min.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/aksTelephoneInput.min.js"></script>
jQuery
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
NPM
npm i akstelephoneinput
<input class="aks-input" type="text" id="tel" name="aks-telephone-input" />
$("#tel").aksTelephoneInput({
valueNumberCode: false,
flagsUrl: "https://unpkg.com/[email protected]/flags/"
});
$("#tel").aksTelephoneInput({
valueNumberCode: false,
autoCountry: true,
geoCountries: function (callback) {
$.get("https://ipwhois.app/json/", function (data) {
callback(data.country_code);
});
},
flagsUrl: "https://unpkg.com/[email protected]/flags/"
});
$("#tel").aksTelephoneInput({
valueNumberCode: false,
changeCountry: function () {
console.log(this);
},
flagsUrl: "https://unpkg.com/[email protected]/flags/"
});
allCountries: [],
onlyCountries: [],
primaryCountries: [],
currentCountries: "",
autoCountry: false,
geoCountries: function (callback) {
$.get("https://ipwhois.app/json/", function (data) {
callback(data.country_code);
});
},
changeCountry: function () {},
placeholderNumber: true,
valueNumberCode: false,
searchBar: true
The code is available under the MIT License.