Event after jqueryui sortable finished sorting
Asked Answered
I

2

8

I want to trigger a callback function after the sorting of jqueryuis sortable completely finished and everything is in place again.

I tried the stop event, but the element I dragged is still positioned absolute, so this is not what I want.

Is there any event to achieve that, or do I need to set up some weird timeout stuff?

Insurgence answered 18/3, 2015 at 9:34 Comment(1)
did you try update event ? api.jqueryui.com/sortable/#event-updateUngrounded
C
11

There is an update method. You can write your code in update method.

update: function(event, ui) {


}
Cumquat answered 18/3, 2015 at 9:38 Comment(0)
L
0

Use this and change your id accordingly

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
    }
Lockridge answered 22/3, 2023 at 13:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.