bootstrap-select-country is a jQuery plugin that utilizes Bootstrap's dropdown.js and bootstrap-select to provide country data and styling to standard select elements.
Download latest releaseRequires jQuery v1.8.0+, Bootstrap’s dropdown.js component, and Bootstrap's CSS. If you're not already using Bootstrap in your project, a precompiled version of the minimum requirements can be downloaded here.
Create your <select>
with the .selectpicker
and .bootstrap-select-country
class. The data-api from bootstrap-select will automatically apply a basic theme to these elements. Then the data-api from bootstrap-select-country will populate the select with countries.
<select class="selectpicker bootstrap-select-country"></select>
Set default country
data-default="United States"
Searchable with bootstrap-select.js
data-live-search="true"
Searchable, data default with flags
data-flag="true"
bootstrap-select-country is maintained by mojoaxel and is based on countrypicker by Saganic.