I am using Select2 Jquery to bind my dropdown which is used for multiple selection . I am using select2 jquery.
It's working fine, I can bind my dropdown but I need to get the selected value from my multi-value selector. I am looking for method to get value which is supported by select2 Jquery. it might be having a function get selected value.
my drop down binding code
$(".leaderMultiSelctdropdown").select2( { maximumSelectionSize: 4 });
alert("Selected value is: "+$(".leaderMultiSelctdropdown").select2("val"));
alternatively, if you used a regular selectbox as base, you should be able to use the normal jquery call, too:
alert("Selected value is: "+$(".leaderMultiSelctdropdown").val());
both return an array of the selected keys.
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