On Page I have 3 multiple-select-boxes. Only for 3rd one I have additional logic (custom onchange
event).
So first 2 I just initialize with line of code :
$('.multiselect').multiselect();
But when I've tried to add custom logic for 3rd select - it doesn't work.
$('#RegionIds').multiselect({
onChange: function(option, checked) {
alert('changed value' + $(option).val());
}
});
Alert never appears in this case.
Update : JsBIN Example : https://jsbin.com/voquhegode/edit?html,js,output
Update 2 :
Thanks for replies. But I've found another issue with multiple selects.
https://jsfiddle.net/x6z6w0n8/7/ In case I want to set selected values on initialize step, I saw one additional select. This causes line of code where I manualy set selected values
$(select).multiselect('select', jsonArr[i].Item1);