From 69d18fce860236582a64546c15178bdac76d3fab Mon Sep 17 00:00:00 2001 From: Benjamin Keen Date: Sun, 23 Mar 2014 21:32:44 -0700 Subject: [PATCH] a little more work... --- example.html | 27 +++++++++++++++---- source/country-region-selector.js | 44 +++++++++++++++++++++---------- 2 files changed, 52 insertions(+), 19 deletions(-) diff --git a/example.html b/example.html index c8dba3e..7b10ea4 100644 --- a/example.html +++ b/example.html @@ -3,13 +3,30 @@ + -

Example 1

+

Example 1

- - +

+ This is a simple no-frills example. +

-
+ + - +
+ +

Example 2

+ +

+ Custom default option texts for both the country and region dropdowns. +

+ + + + +
+ + + \ No newline at end of file diff --git a/source/country-region-selector.js b/source/country-region-selector.js index 41e019e..212ef6c 100644 --- a/source/country-region-selector.js +++ b/source/country-region-selector.js @@ -1,6 +1,9 @@ (function() { "use strict"; + var _countryClass = "crs-country"; + var _regionClass = "crs-region"; + var _data = [ { c: "Afghanistan", cs: "AF", cl: "Badakhshan|Badghis|Baghlan|Balkh|Bamian|Farah|Faryab|Ghazni|Ghowr|Helmand|Herat|Jowzjan|Kabol|Kandahar|Kapisa|Konar|Kondoz|Laghman|Lowgar|Nangarhar|Nimruz|Oruzgan|Paktia|Paktika|Parvan|Samangan|Sar-e Pol|Takhar|Vardak|Zabol" }, { c: "Albania", cs: "AL", cl: "Berat|Bulqize|Delvine|Devoll (Bilisht)|Diber (Peshkopi)|Durres|Elbasan|Fier|Gjirokaster|Gramsh|Has (Krume)|Kavaje|Kolonje (Erseke)|Korce|Kruje|Kucove|Kukes|Kurbin|Lezhe|Librazhd|Lushnje|Malesi e Madhe (Koplik)|Mallakaster (Ballsh)|Mat (Burrel)|Mirdite (Rreshen)|Peqin|Permet|Pogradec|Puke|Sarande|Shkoder|Skrapar (Corovode)|Tepelene|Tirane (Tirana)|Tirane (Tirana)|Tropoje (Bajram Curri)|Vlore" }, @@ -249,29 +252,43 @@ for (var i=0; i