I am using jquery multiselct from this page http://loudev.com/. It works well but now the system requirements need this multiselect to past the data in the order that have
This code reorders the selected options in the multiselect in the order that they are shown in the plugin. They will be in the right order when submitted.
afterSelect: function(value){
$('#countries option[value="'+value+'"]').remove();
$('#countries').append($("").attr("value",value).attr('selected', 'selected'));
},