0
我正在使用jQuery UI可排序以允许用户从4列移动项目以及更改每列中项目的顺序。我有后者没有问题的工作;将新订单更新到数据库。jQuery UI&PHP - 将'To'列发送到PHP
但我不知道如何处理从列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();
});
}
});
所以你在找什么呢?它在工作,对吧? – Horen 2012-07-24 20:54:46
现在它只是发送一个新的排序顺序(即1,2,3,4,5)的数组。它需要发送一个关联数组来显示正在排序的项目及其新的父级UL。 – 2012-07-25 11:39:04