Questions tagged [bootstrap-selectpicker]

Use this when referring to Bootstrap-select by Silvio Moreto. This is a jQuery plugin that utilizes Bootstrap's dropdown.js to style and bring additional functionality to standard select elements.

website

https://silviomoreto.github.io/bootstrap-select/

github

https://github.com/silviomoreto/bootstrap-select

syntax

$('.selectpicker').selectpicker({
  style: 'btn-info',
  size: 4
});

screenshot

enter image description here

326 questions
25
votes
3 answers

$(...).selectpicker is not a function

I am using bootstrap-select for a form. I include the scripts (jquery, bootstrap-select) in the header of the HTML file.
Djov
  • 654
  • 1
  • 10
  • 19
17
votes
8 answers

Select all / Unselect all in Bootstrap Select plugin

lists I am having an issue where it is triggering the on change event twice. for example here is the my select list
I…
kostepanych
  • 2,229
  • 9
  • 32
  • 47
7
votes
2 answers

Cannot change title of Boostrap-select selectpicker

I want to programmatically change the title of my Bootstrap-select selectpicker. I tried the following JS code which does not work. $('#myPicker') .selectpicker({title: 'New title'}) .selectpicker('render'); Any other ways I can do this?
user6758349
6
votes
2 answers

Bootstrap select with BS4 input-group-prepend

I am using bootstrap 4 and bootstrap select version 1.13.2 (latest), which should support bootstrap 4. As mentioned in docs, i even manually specified BS verison via $.fn.selectpicker.Constructor.BootstrapVersion = '4'; I wanted to have an icon…
Martin
  • 404
  • 1
  • 5
  • 15
6
votes
2 answers

d.stopPropagation is not a function on bootstrap select-picker

I have an issue on my site, the select picker works fine a lot of time, but without making any changes on the code, the select-picker stopped working. The error is: bootstrap-select.min.js:7 Uncaught TypeError: d.stopPropagation is not a…
5
votes
2 answers

bootstrap-selectpicker not changing box width

I am trying to change the width of the selectpicker box that shows selected options, but no matter what I try I am unable to change it, nor am I able to change the color of the box. Any ideas or suggestions are appreciated. Code Snippet for what I…
Joseph Sanders
  • 133
  • 1
  • 2
  • 8
5
votes
4 answers

selectpicker : Get the data attribute of selected option

I'm having hard time in to getting the data attribute set to select option on bootstrap selectpicker . I tried: $('.selectpicker').on('changed.bs.select', function (e) { var selected = e.target.value; console.log("value : ", selected ); //…
5
votes
2 answers

click for select and deselect of single drop down like multiple in bootstrap-select

I have used bootstrap select Now, when I click on an option it should be selected as it is working fine, but when I click on the same option it should be deselected with both click and Enter keypress event how it is working on multiple select I…
5
votes
1 answer

How to set selected option with selectpicker plugin from bootstrap

I am using the Bootstrap-Select: For…
London Smith
  • 1,622
  • 2
  • 18
  • 39
4
votes
3 answers

How can I set fixed width for options(dropdown) in bootstrap selectpicker

This is code I…
1
2 3
21 22