我試圖用Jquery進行類別更改& Php。我沒有問題。我的問題是,當更新事件被調用時,它返回2個結果。 1個拖拽父項的結果,1個刪除父項的結果。我想只打電話給父母的身份證。這是我的腳本:Jquery Sortable Update Event只能調用一次?
$("#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();
你能幫助我嗎?
+1優秀。這是一個令人頭疼的問題。謝謝 – 2011-10-03 05:20:06