使用jQuery Sortable()选择多个项目? [英] Selecting multiple items with jQuery Sortable()?
问题描述
我需要在一个可排序的jQuery容器中同时拖动多个项目.在这种情况下,它是应用了sortable()行为的父div中的一系列嵌套div.有什么建议吗?
I need to drag multiple items simultaneously within a jquery sortable container. In this case, it's a series of nested divs within a parent div which has the sortable() behavior applied. Any suggestions?
推荐答案
如果您询问是否可以选择多个项目(在一个实例中选择1、3和7,在另一个实例中选择3,4和8),我不相信jquery当前有办法做到这一点,因为该事件被标记为onclick.
If you are asking if you can select multiple items (say 1, 3, and 7 in one instance, and 3,4, and 8 in another), I do not believe jquery has a way to do this currently, since the event is tagged to onclick.
另一方面,如果要将某些项目分组(1和2始终在一起),只需将它们放在div中即可.
On the other hand, if you want to keep certain items grouped (1 and 2 are always together), just put them together in the div.
这篇关于使用jQuery Sortable()选择多个项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!