From 37217fe83b490fb96af2ec381f67b28842cf4182 Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Thu, 3 Mar 2016 11:19:22 -0800 Subject: [PATCH] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5be3312b1..e4f9ef6b4 100644 --- a/README.md +++ b/README.md @@ -241,6 +241,7 @@ $("#phone").intlTelInput("setNumber", "+44 7733 123 456"); ## Static Methods + **getCountryData** Get all of the plugin's country data - either to re-use elsewhere e.g. to populate a country dropdown - [see example](http://jackocnr.com/lib/intl-tel-input/examples/gen/country-sync.html), or to modify - [see example](http://jackocnr.com/lib/intl-tel-input/examples/gen/modify-country-data.html). Note that any modifications must be done before initialising the plugin. ```js @@ -262,6 +263,9 @@ Load the utils.js script (included in the lib directory) to enable formatting/va $.fn.intlTelInput.loadUtils("build/js/utils.js"); ``` +**~~setCountryData~~ [REMOVED]** +Set the plugin's country data. This method was removed because it makes much more sense to just use `getCountryData` and then modify that ([see example](http://jackocnr.com/lib/intl-tel-input/examples/gen/modify-country-data.html)) instead of having to generate the whole thing yourself - the country data has become increasingly complicated and for each country we now have five properties: the name, [iso2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), international dial code, priority (in case two countries have the same international dial code), and finally a list of area codes used in that country - see [data.js](https://github.com/jackocnr/intl-tel-input/blob/master/src/js/data.js#L36) for more info. + ## Events You can listen for the following events on the input.