Estoy tratando de hacer cambios de categoría con Jquery & Php. No tengo ningún problema con eso. Mi problema es que cuando se llama al evento de actualización, devuelve 2 resultados. 1 resultado para Padre arrastrado, Un resultado para Dropped Parent. Quiero llamar solo la ID del padre abandonado. Aquí está mi script:El evento de actualización ordenable de Jquery puede llamarse solo una vez?
$("#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();
¿Me pueden ayudar chicos?
+1 excelente. Esto fue como un rasguño de cabeza. Gracias –