In the code below the update function gets called twice when an item is moved from list sortable1
to sortable2
. Though I need to call that function only once:
$("#sortable1 tbody, #sortable2 tbody").sortable({
connectWith: '.connectedSortable tbody',
helper: fixHelper,
handle : '.handle',
update : function () {
var order = $('#sortable1 tbody').sortable('serialize');
}
}).disableSelection();
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…