最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Event after jqueryui sortable finished sorting - Stack Overflow

programmeradmin5浏览0评论

I want to trigger a callback function after the sorting of jqueryuis sortable pletely 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?

I want to trigger a callback function after the sorting of jqueryuis sortable pletely 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?

Share Improve this question asked Mar 18, 2015 at 9:34 Johannes KlaußJohannes Klauß 11.1k18 gold badges71 silver badges127 bronze badges 1
  • did you try update event ? api.jqueryui./sortable/#event-update – Frebin Francis Commented Mar 18, 2015 at 9:36
Add a ment  | 

2 Answers 2

Reset to default 11

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

update: function(event, ui) {


}

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
    }
发布评论

评论列表(0)

  1. 暂无评论