views:

45

answers:

1

Hi folks,

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? =)

+3  A: 

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

Robusto
@Robusto: thanks! That was pretty cool! =)
RadiantHex
@RadiantHex: Then show me some love and boost your accept rate by clicking the check mark next to this answer. The higher your accept rate, the more likely you will be to get quick answers from the SO community.
Robusto