Skip to main content

Search and Top Navigation

#10636 closed bug (notabug)

Opened October 01, 2014 02:21PM UTC

Closed October 01, 2014 05:56PM UTC

add more evet listener on selectmenu

Reported by: janom Owned by:
Priority: minor Milestone: none
Component: ui.selectmenu Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:

when change mySelect i got two alert, but when i change mySelectUi a got only second alert

<select id="mySelect" >
<option value="1">1111111</option>
<option value="2">2222222</option>
<option value="3">3333333</option>
<select id="mySelectUi" >
<option value="1">1111111</option>
<option value="2">2222222</option>
<option value="3">3333333</option>
<script type="text/javascript" >
function a1(event, ui){ alert("a1"); }
function a2(event, ui){ alert("a2"); }

document.getElementById("mySelect").addEventListener("change", a1);
document.getElementById("mySelect").addEventListener("change", a2);
jQuery("#mySelectUi").selectmenu({ change: a1 });
jQuery("#mySelectUi").selectmenu({ change: a2 });
Attachments (0)
Change History (2)

Changed October 01, 2014 03:07PM UTC by janom comment:1

Changed October 01, 2014 05:56PM UTC by scottgonzalez comment:2

resolution: → notabug
status: newclosed

The native change event and the custom change event are not the same thing. Please ask for help on the forums, IRC, or Stack Overflow.