This is actually a good question because it shows how jQuery handles draggable items. Your draggable items cannot be dragged outside the parent div's "elements" because they constitute a restriction on them.
So, you can refuse to use the element elements of the parent element, then you can drag them to where you want.
Or you can increase the size of the parent using width and height from 100%.
If you use Draggable inside the bootstrap container, you will notice that they can be dragged to the borders of the container, but never outside it.
You can also try to put roaming elements outside the parent element with an absolute position.
CSS
.draggable{ width: 60px; z-index: 15; margin: 0 auto; position: absolute; } #elements{ overflow: scroll; position:absolute; left:20px; width:100%; height:100%; background:#fff; border:1px solid #000; z-index:5; padding:10px; font-size: 10px; }
Html:
<div id="elements"/> <div id="" class="draggable ui-widget-content"> <p>Drag me around</p> </div>
source share