On Feb 21, 3:36 pm, Shedokan <[email protected]> wrote:
> I have a div which is draggable and I want the user not to be able to
> drag it outside it's parent div.

You can set the "containment" option to "parent" when you're invoking
the draggable method, e.g.:

$('#mydraggableElement').draggable({containment: 'parent'});

See: http://docs.jquery.com/UI/Draggable#options





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to