How to drag and drop multiple elements with jQuery Drag and Drop (with jQuery 1.4.x)
There is a plugin in the jQuery plugins repository, http://plugins.jquery.com/project/multidraggable, that does this for jQuery 1.3.x.
When I use it in 1.4.x (and jQuer开发者_运维百科y UI 1.8.x), I am able to select multiple elements, but when I drag, only one element is dragged.
Can anyone help explain how I could get this working? Not sure if this is outside the realm of stack overflow, if so, my apologies.
The below works for jQuery 1.7 (current latest):
https://github.com/someshwara/MultiDraggable
Usage:$(".className").multiDraggable({ group: $(.className)});
Drags the group of elements together. Group can also be an array specifying individual elements.
Like:$("#drag1").multiDraggable({ group: [$("#drag1"),$("#drag2") ]});
精彩评论