3

I need to programmatically open a bootstrap select, not show like documentation says
(it affects displaying)

It seems to be a missing method, so how can it be done?

neoDev
  • 2,629
  • 2
  • 29
  • 61

2 Answers2

1

Use the toggle method. It programmatically toggles the bootstrap-select menu open/closed.

$('.selectpicker').selectpicker('toggle');
caseyjhol
  • 1,842
  • 2
  • 15
  • 20
0

I tried the documentation and it wasn't working for me either, so I did some research and apparently opening a select list is not an easy thing to do programatically with JavaScript.

check out this Post and this Post.

What I would probably recommend is to use a Bootstrap .btn-dropdown instead of a select list if possible?

Community
  • 1
  • 1
SuperVeetz
  • 2,020
  • 3
  • 21
  • 35