开发者

Multiple divs drag

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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜