On 22 פברואר, 00:44, Weston C <notsew- [email protected]> wrote: > 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
Yes I tried that but it doesn't allow the bounds of the div get outside the container. what I want is like when you drag windows in an operating system. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
