not only i want konw which items were seleced,,but also what order these selected items was..
so i do it as below , Is there other easy way ?
$(document).on("submit", "form", function(event){
var mselect = $('#myselect');
var ms = $('#ms-myselect');
var ids = $.map(ms.find('.ms-selection li[ms-value]'),function(e){return $(e).attr('ms-value')})
mselect.append(mselect.find("option").remove().sort(function(a, b) {
return ids.indexOf($(a).val()) > ids.indexOf($(b).val());
}));
});
not only i want konw which items were seleced,,but also what order these selected items was..
so i do it as below , Is there other easy way ?