Reputation: 21
Take a look at this -> http://jsfiddle.net/Zj23S/1/
I am using resizable and draggable. The problem I am facing is with draggable. I cannot seem to drag outside of the div, probably because I set div.position = absolute. If I take this away my resizing moves the other elements, which I do not want. How can I drag the element anywhere on the screen while maintaining position absolute?
Thanks!
Upvotes: 2
Views: 9236
Reputation: 231
it's a problem in resizable:
(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:e.top,left:e.left})
So, the only thing you should do is removing class .ui-draggable and all will be OK, because the check will fail if start position of the elements was relative.
You can do it by adding
{... addClasses: false ...}
setting in your draggable options
Upvotes: 3
Reputation: 637
Try this I think it will help you.
http://dev.iceburg.net/jquery/jqDnR/
or if you want jQuery UI: http://viralpatel.net/blogs/2010/01/jquery-resizable-draggable-resize-drag-tutorial-example.html
Upvotes: 3