An easy-to-use country picker.
With flags:
<div class="niceCountryInputSelector" style="width: 300px;" data-selectedcountry="US" data-showspecial="false" data-showflags="true" data-i18nall="All selected"
data-i18nnofilter="No selection" data-i18nfilter="Filter" data-onchangecallback="onChangeCallback" />
</div>
Without flags, showing ISO
<div class="niceCountryInputSelector" style="width: 300px;" data-selectedcountry="US" data-showspecial="false" data-showflags="false" data-i18nall="All selected"
data-i18nnofilter="No selection" data-i18nfilter="Filter" data-onchangecallback="onChangeCallback" />
</div>
Continent selection
<div class="niceCountryInputSelector" style="width: 300px;" data-selectedcountry="_EU" data-showcontinentsonly="true" data-showflags="true" data-i18nall="All selected"
data-i18nnofilter="No selection" data-i18nfilter="Filter" data-onchangecallback="onChangeCallback" />
</div>
Country selection with "All" and "None" option. e.g. Used when filtering data by country.
<div class="niceCountryInputSelector" style="width: 300px;" data-selectedcountry="_AL" data-showcontinentsonly="false" data-showflags="true" data-i18nall="All selected"
data-i18nnofilter="No selection" data-i18nfilter="Filter" data-onchangecallback="onChangeCallback" data-showspecial="true"/>
</div>
//call back function (optional)
function onChangeCallback(ctr){
console.log("The country was changed: " + ctr);
//$("#selectionSpan").text(ctr);
}
//init picker when document is ready
$(document).ready(function () {
$(".niceCountryInputSelector").each(function(i,e){
new NiceCountryInput(e).init();
});
});