I\'m trying to use jQuery plugin \"Chosen\"
(http://harvesthq.github.com/chosen/ and https://github.com/harvesthq/chosen)
in my project.
What I\'m
This will reload the selection after xhr request (refresh list) and delete the selection if the new item list not contains the earlier selected item:
var chosenSelectedItems = $(".chosen-select").val();
$('select#GroupsStr').empty();
$.each(xhr.ReturnValue, function (index, item) {
var newOption = $('');
$('select#GroupsStr').append(newOption);
});
$("select#GroupsStr").val(chosenSelectedItems).trigger("chosen:updated");