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.
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.
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.