Multiple drag and drop divs

How to drag multiple divs using jQuery UI? Is it possible to accept an array of divs?

+3
source share
3 answers

This sounds perfect for your needs: https://github.com/someshwara/MultiDraggable

Using: $(".className").multiDraggable({ group: $(.className)});

Drags a group of items together. A group can also be an array defining individual elements.

Like: $("#drag1").multiDraggable({ group: [$("#drag1"),$("#drag2") ]});

+3
source

$ ("divclass.") Dragable () ;.

Will do something with the class, "divclass" draggable

0
source

you make a div in each class, for example:

<div id="1st" class="go">
<div id="2nd" class="go">
<div id="3rd" class="go">

then

$('.go').draggable();
0
source

Source: https://habr.com/ru/post/1765578/


All Articles