1

I'm trying to mimic focus on a select field.

e.g. When a user gains focus on a select field, the select field shows the options in a drop down list.

When using $('select').focus(), the options are not shown.


Any help on this one guys? =)

RadiantHex
  • 24,907
  • 47
  • 148
  • 244
  • possible duplicate of [Can I open a dropdownlist using jQuery](http://stackoverflow.com/questions/360431/can-i-open-a-dropdownlist-using-jquery) – Gert Grenander Jul 19 '10 at 00:18

1 Answers1

4

Set the size attribute of the select to 6 (or whatever small int you like) on focus and back to 0 on blur.

Robusto
  • 31,447
  • 8
  • 56
  • 77