There are few options in my select2 dropdown menu. when user add one item next time previous value disable (freeze).
$('#m_select2_2').change(function () {
$.each(this.options, function (i, item) {
console.log("checked");
if (item.selected) {
$(item).prop("disabled", true);
} else {
$(item).prop("disabled", false);
}
});
});
This one not work.