jQuery UIs Sortable を使用して、ユーザーが 4 つの列から項目を移動したり、各列内の項目の順序を変更したりできるようにしています。後者は問題なく動作しています。新しい注文をデータベースに更新します。
しかし、列 A から列 B への移動を格納する方法がわかりません。順不同の各リストには一意の ID があるため、その情報を送信したいと思います。私はこれを行う方法をしっかりと理解していません。
$("#list1, #list2, #list3, #list4").sortable({
connectWith: ".sort",
placeholder: "shadow",
dropOnEmpty: true,
opacity: 0.8,
cursor: 'move',
update: function() {
var order = $(this).sortable("serialize") + '&update=update';
$.post("/update.php", order, function(theResponse) {
$("#alert").html(theResponse);
$("#alert").slideDown('slow');
slideout();
});
}
});