I am currently working on implementing a drag and drop feature using jQuery UI. In my setup, I have a container with position 'relative' and draggable elements inside it positioned as 'absolute'. My goal is to confine these draggable elements within the container while enabling scrolling beyond its boundaries. To achieve this, I initialized the draggable elements like so:
$(".draggable").draggable({
containment:'parent',
scroll:true
})
https://jsfiddle.net/zjncn6zy/1/
However, the behavior is not as expected. Removing the 'containment' option allows the draggables to auto-scroll, but they do so within the body rather than confined to the container.
What I am looking for is for the draggables to auto-scroll within the container as I drag them beyond its boundaries.
If anyone could offer some guidance or a solution to help me resolve this issue, I would greatly appreciate it. Thank you.