Drag to assigned box

8 views
Skip to first unread message

ag3ntdam

unread,
Dec 1, 2009, 8:38:05 AM12/1/09
to threedubmedia
Hi,

I wanted to know if you can provide a code that only allows certain
drag objects to a drop box. Like restricted allow and disallow. Is
this possible?

I was using your demo as a test.

http://threedubmedia.com/demo/drop/

Basically only boxes 1 and 2 can go into A and not in B.

3wme

unread,
Dec 1, 2009, 11:08:27 AM12/1/09
to threedubmedia
http://jsbin.com/upeme

The trick is to use the "$.dropManage" utility function and the
"filter" option to reduce the set of drop targets for the next drag
interaction.

ag3ntdam

unread,
Dec 2, 2009, 8:13:36 AM12/2/09
to threedubmedia
Hey 3wme.

Thanks for the reply.

I figured it had to be some type of dropManage function. Also to drag
the boxes back out I would use the same function from the previous
demo?

3wme

unread,
Dec 2, 2009, 10:15:00 AM12/2/09
to threedubmedia
Yes. To remove the boxes from the drop targets you could use the code
from the previous demo you mentioned.

http://threedubmedia.com/demo/drop/
Reply all
Reply to author
Forward
0 new messages