Johannes Klauß
Johannes Klauß

Reputation: 11020

Event after jqueryui sortable finished sorting

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?

Upvotes: 8

Views: 3397

Answers (2)

Punit
Punit

Reputation: 1

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
    }

Upvotes: 0

Kautil
Kautil

Reputation: 1331

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

update: function(event, ui) {


}

Upvotes: 11

Related Questions