1

I have a select element like this:

<select name="select1" id="select1">
    <option value="1">1</option>
    <option value="2">2</option>
</select>

I have written a onchange event:

$(document).on('change', '[id*=select1]', function () {
            alert('in change select1');
});

Now suppose I have option 1 selected and I again go and select the same option (option1), then the change event is not fired.

I want to handle the event which will be fired in this case. Can anyone tell me which even will be fired when I try to select the option which is already selected?

Arti
  • 2,993
  • 11
  • 68
  • 121

1 Answers1

0

try:

$(document).on('mouseup', '[id*=select1]', function () {
    alert('in change select1');
});

demo

Yangguang
  • 1,785
  • 9
  • 10