0

How to promt native select element using JS?

http://jsfiddle.net/dqa0p30q/

$('#img').click(function() {
  alert('');
  $('select').trigger('change');
  $('select').focus()// this won't work too
})
Alien Xu
  • 193
  • 2
  • 3
  • 12

1 Answers1

0

You can do like:

$('#img').click(function() {
  alert('');
  $('select').trigger('change');
  $('select').focus()
  selectbox = $('select')[0]
  selectbox.size = selectbox.options.length;
})
Dhara Parmar
  • 8,021
  • 1
  • 16
  • 27