tags:

views:

181

answers:

1

Does anybody know how dropdown list can be opened with trigger?

Here is code which doesn't work:

$('select').trigger('click');

Just for note - mousedown and mouseup also doesn't work.

+1  A: 

What you are trying to achieve is impossible. Even if you trigger a click the drop down list won't open like if the user clicked on it. If you want to change the currently selected value with a new one you could use the val function. I guess the only solution is to simulate the whole UI look and feel of a select element using divs.

Darin Dimitrov
Thanks for response. I don't want to change value, just want to open list... It seems that there isn't propertly solution for this...
sasa