结合jQuery可排序和拖放事件 [英] Combining jQuery Sortable and Drop Event
本文介绍了结合jQuery可排序和拖放事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
基本上我有一个可拖动列表,与可排序的列表相关联。除非我需要某种Drop事件,否则我可以使用它来将列表项删除到可排序列表中来更改列表项。
Basically I have a draggable list which is connected with a sortable list. Works great except I need some sort of Drop event which I can use to change the list item after its dropped into the sortable list.
这适用于.draggable - > .droppable,但是是否有一个可修复的draggable - > .sortable?
This works with .draggable -> .droppable but is there a fix for draggable -> .sortable?
推荐答案
想出来,结果是有一个接收事件与droppable相同。
Figured out, turns out there is a receive event which is the same as drop for the droppable.
$('.selector').sortable({
receive: function(event, ui) { ... }
});
这篇关于结合jQuery可排序和拖放事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文