Country Calling Code Picker jQuery Ccpicker - Free Download Country Calling Code Picker With Flags - jQuery ccpicker.js

Free Download Country Calling Code Picker With Flags – jQuery ccpicker.js

Posted on

This time I will share jQuery Plugin and tutorial about Country Calling Code Picker With Flags – jQuery ccpicker.js, hope it will help you in programming stack.

Country Calling Code Picker jQuery Ccpicker - Free Download Country Calling Code Picker With Flags - jQuery ccpicker.js
File Size: 88.7 KB
Views Total: 48699
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

ccpicker.js is a lightweight Country Code Picker plugin which enables the user to select International Calling Codes from a flag dropdown list.

How to use it:

1. Insert jQuery JavaScript library and the jQuery ccpicker plugin’s files into your web page.

2         integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ"
3         crossorigin="anonymous">
4 </script>
5 <script src="js/jquery.ccpicker.js"></script>
6 <link rel="stylesheet" href="css/jquery.ccpicker.css">

2. Call the plugin to append the Country Code Picker to your input field.

1 <input type="text" id="phoneField" name="phoneField" class="phone-field">
1 $("#phoneField").CcPicker();

3. Set the pre-selected Country Code.

1 $("#phoneField").CcPicker({
2   "countryCode":"us"
3 });

4. Set the Country Code manually.

1 $("#phoneField").CcPicker("setCountryByCode","es");

5. By default, the plugin loads Country Code data from data.json via AJAX. You can define the data source in the JavaScript as this:

1 $("#phoneField").CcPicker({
2   dataUrl: "data.json"
3 });

Changelog:

2020-07-17

  • Update jquery.ccpicker.js

2018-11-07

  • data.json fixed

2018-03-06

  • JS update

This awesome jQuery plugin is developed by fr33land. For more Advanced Usages, please check the demo page or visit the official website.