2

Possible Duplicate:
Show select dropdown in jQuery?

Is it possible to open a selectbox with JavaScript? Or with jQuery?

Community
  • 1
  • 1
timopeschka
  • 401
  • 3
  • 8
  • 16

3 Answers3

5

In short: no, it's not possible. Long answer, see How do you open a select box with JavaScript?.

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
mmtauqir
  • 7,279
  • 9
  • 32
  • 42
  • Adding this as an option kendo has a dropdown that has an open method https://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#methods-open – dburmeister Oct 06 '17 at 18:53
1

If you want to "open" a selectbox, this is impossible - see Stack Overflow question Click trigger on select box doesn't work in jQuery for more information.

If you want to select a value, you should use .val().

Community
  • 1
  • 1
JMax
  • 25,301
  • 12
  • 66
  • 87
-2

Duplicate: Show select dropdown in jQuery?

Can't be done, you can use .trigger('focus') but it will not open the drop down.

Community
  • 1
  • 1
Calum
  • 5,098
  • 1
  • 21
  • 27