admin管理员组文章数量:1309995
I am currently using the jQuery Chosen plugin, and it is working well. Currently, I can bind to Chosen's change event like so:
$('#the_selector').chosen().change( ... );
And this works fine. I have encountered a case, however, where I need to bind to the change event after Chosen has already been applied to the select. Is there a way to do this?
I am currently using the jQuery Chosen plugin, and it is working well. Currently, I can bind to Chosen's change event like so:
$('#the_selector').chosen().change( ... );
And this works fine. I have encountered a case, however, where I need to bind to the change event after Chosen has already been applied to the select. Is there a way to do this?
Share Improve this question edited Mar 28, 2013 at 19:45 j0k 22.8k28 gold badges81 silver badges90 bronze badges asked Sep 28, 2012 at 8:03 HarryHarry 4,8357 gold badges42 silver badges70 bronze badges2 Answers
Reset to default 7I was able to bind to the event using:
$('#the_selector').on('change', function(){
Do stuff
});
it uses the standard change event with some params as below
$('.PayeeID').on('change', function (evt, params) {
var selectedValue = params['selected']
dosomthing(selectedValue);
}
params ==> has the selected value if it is single select
本文标签: javascriptChosenBinding to change event after Chosen is applied to selectStack Overflow
版权声明:本文标题:javascript - Chosen - Binding to change event after Chosen is applied to select - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741842153a2400566.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论