If i recall correctly there is an onDrop function that you can call when
initialising the droppable...
So what i would do is ondrop count the elements with the classname that are
inside the droppable... or even easier .. ondrop update a hidden element on
the page to the value of the number of dropped elemenets in it and ondrop
also check that hidden value and not let it drop if its more than 1
Both will work
----- Original Message -----
From: "Jason Whitmer" <jwhit...@gmail.com>
To: "Prototype & script.aculo.us" <firstname.lastname@example.org>
Sent: Thursday, November 19, 2009 9:45 PM
Subject: [Proto-Scripty] Limit number of draggables allowed in a droppable
> How do I limit a Droppable to contain only 1 Draggable?
> I have a Droppable:
> <div id="myDroppable">
> <div id="staticText">Description</div>
> And a Draggable:
> <div id="myDraggable">
> DRAG ME
> Which I setup like this:
> new Draggable('myDraggable');
> Thank you,
> You received this message because you are subscribed to the Google Groups
> "Prototype & script.aculo.us" group.
> To post to this group, send email to
> For more options, visit this group at
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
For more options, visit this group at