开发者

Multiple divs drag

开发者 https://www.devze.com 2023-01-17 00:16 出处:网络
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:

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

精彩评论

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