I am trying to change a category using jQuery and php. I have no problem with this. My problem is that when the update event is called, 2 results are returned. 1 result for Dragged Parent, one result for Dropped Parent. I want to call only the dropped parent id. Here is my script:
$("#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();
Can you help me guys?
jquery jquery-ui-sortable draggable
R. Canser Yanbakan Jun 23 '10 at 11:26 2010-06-23 11:26
source share