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,879
  • 3
  • 33
  • 66

2 Answers2

0

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

$('.selectpicker').selectpicker('toggle');
caseyjhol
  • 3,090
  • 2
  • 19
  • 23
-1

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,128
  • 3
  • 24
  • 37