jQuery-select2 - Get values in the order they were selected
问题 I'm developing a form with a number of multiselects. I use Select2 library for that. $(".chosen-select").select2({ allow_single_deselect: true, width: "150px" }); ...... <select id="ship2" class="chosen-select" data-placeholder="Select vessel"> <option></option> <option value="value1">title1</option> <option value="value2">title2</option> </select> The problem is that when I try to get selected values they are returned in the order they are specified in <select> element, not the order they