jquery events receive and stop not working on droppable lists -
the html formed , working correctly, neither alerts or functions firing; seems these aren't working. i'm stumped, because seems strange work stop:, nothing else.
i'm persisting order within tabs successfully, without these events firing, i'm not sure how persist moves across tabs without hacking.
$( ".connectedsortable" ).sortable({ opacity: 0.5, placeholder: "ui-state-highlight", stop: function( event, ui ) { $('.connectedsortable').each(function() { if($("#"+this.id).length > 0){ var margin_id = $(this).attr('margin_id'); var group_id = $(this).attr('group_id'); var sortedids = $( "#"+this.id ).sortable( "toarray" ); console.log(sortedids); update_widget_order(sortedids,__user_id,__page_id,margin_id,group_id); } }); // update widget order }, receive: function( event, ui ) { alert('test'); $('.connectedsortable').each(function() { if($("#"+this.id).length > 0){ var margin_id = $(this).attr('margin_id'); var group_id = $(this).attr('group_id'); var sortedids = $( "#"+this.id ).sortable( "toarray" ); console.log(sortedids); update_widget_order(sortedids,__user_id,__page_id,margin_id,group_id); } }); } , remove: function( event, ui ) { alert('remove'); /*$('.connectedsortable').each(function() { if($("#"+this.id).length > 0){ var margin_id = $(this).attr('margin_id'); var group_id = $(this).attr('group_id'); var sortedids = $( "#"+this.id ).sortable( "toarray" ); console.log(sortedids); update_widget_order(sortedids,__user_id,__page_id,margin_id,group_id); } });*/ } }).disableselection();
Comments
Post a Comment