Reputation: 1349
I want to set position of my jQuery UI Dragable element to absolute so it takes no space in the document flow. But after doing this when I try to drag it. It moves out of the document. Is there a way so I can set its position relative to position of its container div. Thanks
Upvotes: 0
Views: 2687
Reputation: 694
Perhaps the way it's documented on http://jqueryui.com/draggable/#constrain-movement
For example:
$('.divelement').draggable({
containment: $('body')
});
Or explain it a with jsFiddle, please.
Upvotes: 1