nested sortable question
nested sortable question
Hello,
i'm trying to bild a sortable with nested divs like this:
<div id="single1">1</div>
<div id="single2">2</div>
<div id="group1">
<div id="single3">3</div>
<div id="single4">4</div>
</div>
<div id="group2">
<div id="single5">5</div>
<div id="single6">6</div>
</div>
<div id="single7">7</div>
Making the divs sortable is easy. Using {items: 'div'} all divs are
sortable, so dragging a single into a group is possible as well as
draggin for example group2 into group1.
I would like to restrict the sorting so that it is only possible to
drag a single into or out of a group. But the groups should be still
sortable so that i can get a result like this:
<div id="single7">7</div>
<div id="single1">1</div>
<div id="group2">
<div id="single6">6</div>
</div>
<div id="single2">2</div>
<div id="group1">
<div id="single3">3</div>
<div id="single5">5</div>
<div id="single4">4</div>
</div>
Is this possible?
Thanks for help in advance,
Dirk