jqueryui sortable完成排序后的事件

Event after jqueryui sortable finished sorting

本文关键字:事件 排序 sortable jqueryui      更新时间:2023-09-26

我想在jqueryuis sortable的排序完全完成并且所有东西都重新就位后触发一个回调函数。

我尝试了stop事件,但我拖动的元素仍然是绝对的,所以这不是我想要的。

有什么事件可以实现这一点吗?或者我需要设置一些奇怪的超时设置吗?

有一个更新方法。您可以用update方法编写代码。

update: function(event, ui) {

}

使用此选项并相应地更改您的id

var sortableFormList = document.getElementById("editDynamicSpace");
new Sortable(sortableFormList, {
    animation: 150,
    handle: ".card-header",
    ghostClass: 'blue-background-class',
    onEnd: function(e) {
        // write steps which you want to perform after sorting
    }