Jquery ui sortable drop event Jquery ui sortable drop event jquery jquery

Jquery ui sortable drop event


You can also use update to detect it.

$( "#sortable" ).sortable({    update: function( ) {        // do stuff    }});


I could solve the problem with jQuery UI Sortable stop event.

$(function() {    $( "#sortable" ).sortable();    $( "#sortable" ).disableSelection();    $( "#sortable" ).sortable({        stop: function( ) {            var order = $("#sortable").sortable("serialize", {key:'order[]'});            $( "p" ).html( order );        }    });});


When using with multiple sortable lists on a single page where you also need to save the order of both lists as well as what items were moved into which list, only the stop() method works. All other events fire twice or more when elements are moved from one list into another.

$(function() {    $( "#sortable" ).sortable();    $( "#sortable" ).disableSelection();    $( "#sortable" ).sortable({        stop: function( ) {            var order = $("#sortable").sortable("serialize", {key:'order[]'});            $( "p" ).html( order );        }    });});