我正在尝试使用Jquery和Php进行分类更改。我没有问题。我的问题是,当调用更新事件时,它返回2个结果。一个是拖动的父级别,另一个是放置的父级别。我只想调用放置的父级别的ID。这是我的脚本:
你们能帮帮我吗?
$("#gallery ul").sortable({
connectWith: '.dropBox',
opacity: 0.35,
scroll: true,
scrollSensitivity: 100,
//handle: '.move',
helper: 'clone',
containment:'#gallery',
accept:'#gallery > .photo',
revert: true,
update: function(event, ui){
params = 'c=' + $(this).attr('id') + '&id=' + ui.item.attr('id');
$.ajax({
type: 'POST',
url: 'processData.php',
data: params,
error:function(){
alert("Error!");
},
success:function(data){
$("#serverResponse").html(data);
}
});
}
}).disableSelection();
你们能帮帮我吗?