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: |
Description
when change mySelect i got two alert, but when i change mySelectUi a got only second alert
<body> <select id="mySelect" > <option value="1">1111111</option> <option value="2">2222222</option> <option value="3">3333333</option> </select> <select id="mySelectUi" > <option value="1">1111111</option> <option value="2">2222222</option> <option value="3">3333333</option> </select> <script type="text/javascript" > jQuery("#mySelectUi").selectmenu(); 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 }); </script> </body>
http://jsfiddle.net/janom/chuyzof0/2/