i have a requirement in which i have a container div that contains 3 <ul> on which dragsort is attached stucture is comething like
<div id="container">
<ul id="list1">
<li><div>a</div></li>
<li><div>a</div></li>
<li><div>a</div></li>
<li><div>a</div></li>
</ul>
<ul id="list2">
<li><div>b</div></li>
<li><div>b</div></li>
<li><div>b</div></li>
<li><div>b</div></li>
</ul>
<ul id="list3">
<li><div>c</div></li>
<li><div>c</div></li>
<li><div>c</div></li>
<li><div>c</div></li>
</ul>
</div>
Requirement:
these item are dragged & drop in between these lists . but item should not be taken out of the container div (visually not) is there any way to detach the mouse from the item when somone is trying to drag item out of the container div
like there is
containment: "#containment-wrapper" in jquery .draggable(
reference: http://jqueryui.com/demos/draggable/#constrain-movement
If you’re referring to jQuery List DragSort, it is coded to contain the dragged item within a container but only inside UL if you’re not dragging between lists. So to specify a custom container you will need to modify the code. So find this in the code:
And replace with:
Next find this:
And replace with this:
Now invoke dragsort like this: