I am using Chosen jQuery plugin, and I have successfully installed it. now I want to get the selected or deselected items, here is the docs:
http://harvesthq.github.io/chosen/options.html
It says on change trigger, it sends select
and deselect
as parameters, how could I access to those?
for example:
$('#days').on('change', function(evt, params) {
// alert selected val if the users selected new item
// alert deselected val if the users deselected item
}
Thanks
Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors.
$('#days').on('change', function(evt, params) {
// can now use params.selected and params.deselected
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With