How to constrain the movement inside a parent element?
Is it possible to constrain the movement of a draggable element inside another element, like shown in the jqueryui examples: https://jqueryui.com/draggable/#constrain-movement ?
Yea I'm looking to do something very similar because when I drag my div I can keep moving it to the right of my screen and it will eventually be off the view of my webpage
Anyone have an update on this? I'm encountering the same issue.
Solution was to add the 'containment' property to data-jqyoui-options, like so:
data-jqyoui-options="{containment: '.draggable-container'}"
In this case I'm using the .draggable-container class to constrain the draggable elements.