答案 0 :(得分:2)
https://jsfiddle.net/refan/axyyqenb/
$("button").on("click", function() {
var selected = $("#menu_select option:selected");
var prev = selected.prev();
selected.after(prev);
});
答案 1 :(得分:0)
我认为这是正确的方法:
$("#menu_select option:selected").prependTo("#menu_select");
答案 2 :(得分:0)
尝试:
$("#menu_select option:selected").next().insertBefore("#menu_select option:selected");
$("#menu_select option:selected").prev().insertAfter("#menu_select option:selected");