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