Questions tagged [bootstrap-select]

A custom select / multiselect for Bootstrap using button dropdown, designed to behave like regular Bootstrap selects.

Bootstrap-select is jQuery plugin for bootstrap. It replaces the select HTML tags with Bootstrap dropdown buttons.

Quick Start

Bootstrap-select requires jQuery v1.9.1+, Bootstrap’s dropdown.js component, and Bootstrap's CSS. If you're not already using Bootstrap in your project, a precompiled version of the Bootstrap v3.4.1 minimum requirements can be downloaded here.

If using bootstrap-select with Bootstrap v4+, you'll also need Popper.js. For all of Bootstrap v4's requirements, see Getting started. A precompiled version of the requirements will be made available in an upcoming release of bootstrap-select.

Several quick start options are available:

  • Download the latest release.
  • Clone the repo: git clone https://github.com/snapappointments/bootstrap-select.git
  • Install with npm: npm install bootstrap-select
  • Install with yarn: yarn add bootstrap-select
  • Install with Composer: composer require snapappointments/bootstrap-select
  • Install with NuGet: Install-Package bootstrap-select
  • Install with Bower: bower install bootstrap-select
  • Install via CDN (cdnjs or jsDelivr):

Stack Snippet Starter Pack

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta/dist/css/bootstrap-select.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta/dist/js/bootstrap-select.min.js"></script>

<!-- (Optional) Latest compiled and minified JavaScript translation files -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.14.0-beta/dist/js/i18n/defaults-*.min.js"></script>


<select class="selectpicker">
    <option>Mustard</option>
    <option>Ketchup</option>
    <option>Barbecue</option>
</select>

Note: The CDN is updated after the release is made public, which means that there is a delay between the publishing of a release and its availability on the CDN.


Bootstrap 4 only works with bootstrap-select v1.13.0+. By default, bootstrap-select automatically detects the version of Bootstrap being used. However, there are some instances where the version detection won't work. See the documentation for more information.

594 questions
121
votes
24 answers

How to set selected value on select using selectpicker plugin from bootstrap

I'm using the Bootstrap-Select plugin like this: HTML:
user3690515
  • 897
  • 2
  • 7
  • 13
42
votes
4 answers

How to reset value of Bootstrap-select after button click

I am using Bootstrap-select plugin (https://silviomoreto.github.io/bootstrap-select/) for my dropdown select box. After I click a button, I want the box to refresh and the "selected" option to reset. This is the dropdown
17
votes
1 answer

AJax does not work with bootstrap-select

I found flask-jquery-ajax example where the user selects an item from the vehicle "Make" drop down menu, the vehicle "Model" drop down menu is populated by making an AJAX request for a list of models for the make selected. I tried to replace the…
user977828
  • 7,259
  • 16
  • 66
  • 117
14
votes
4 answers

Bootstrap-select on click get clicked value

I am using a jQuery plug-in: bootstrap-select.js my HTML is select(multiple) -> option. I would like to get the currently clicked on option value when a user selects or deselects the option. Example: User selects Item 4 = console.log item 4. Then…
Bonttimo
  • 621
  • 1
  • 9
  • 23
13
votes
5 answers

Bootstrap-select plugin: how to avoid flickering

The Bootsrap-select plugin is amazing (http://silviomoreto.github.io/bootstrap-select/). It provides an extremely easy way of creating gorgeous select menus in Bootstrap. The one problem I've encountered with it, however, is "flickering" on page…
12
votes
4 answers

Bootstrap select loading takes too long in IE

I'm loading 1000 records to a bootstrap select dropdownlist. It takes about 2 seconds in Chrome but takes 30 seconds in IE 9. Also, cancel or x out the bootstrap modal in IE takes 10+s too. The API call is ok but the rendering is so slow; Could…
Quentin
  • 1,310
  • 18
  • 30
1
2 3
39 40