How do I drag and drop multiple divs using jquery UI? Is there any option t开发者_开发百科o accept an array of divs?
This sounds perfect for your need: 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") ]});
$(".divclass").draggable();
Will make anything with the class, "divclass" draggable
you make in every div a class for example:
<div id="1st" class="go">
<div id="2nd" class="go">
<div id="3rd" class="go">
then
$('.go').draggable();
精彩评论