Forum: Ruby on Rails How to drag & drop within a DIV?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9d069b3237bc411726d3a83d9077508d?d=identicon&s=25 Charlie (Guest)
on 2006-04-25 16:55
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
Efe398b3b5436b0a8d4430090e8f86ea?d=identicon&s=25 seth b. (subimage)
on 2006-05-24 08:53
(Received via mailing list)
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.
This topic is locked and can not be replied to.