How to drag & drop within a DIV?


#1

Suppose some elements created using scriptaculous, and now want to add
drag&drop characteristic to them,but the draggable elements can be
dragged with the scope of whole browser,how to limit the draggable area
within some DIV,for example the div that the elements lie in.
Thanks

Charlie


#2

I’ve found messing with the overflow property of a div limit the
dragging -
which I don’t like.

If you contain the items within a div that’s got ‘overflow:auto’ set on
it
you can’t drag outside the div.

I’m guessing overflow:hidden will work the same way.