In fact, here's the code for a really simple example. What *should*
happen is that you should be able to drop the first text onto the
second text and it should stay there. Not so though:


<div id="draggable" class="dropme">drag me</div>
<div id="droppable">drop here</div>

<script>
Droppables.add ('droppable', {accept: 'dropme'});
new Draggable ('draggable', {revert: 'failure'});

Please correct me if I'm wrong, but as far as I can tell, that code
example is exactly what the documentation says and should work....but
evidently doesn't :(

On Apr 28, 8:03 am, Guillaume Lepicard <guillaume.lepic...@gmail.com>
wrote:
> hi,
>
> as far as i can remember, the accept option has to be in a selector syntax:
> try
> new Draggable ('draggable', {revert: 'failure', accept: '.dropme'});
> or
> Droppables.add(audience-element-0, {accept: '.Social', onDrop:
> this.dropElement});
>
>
>
> On Tue, Apr 27, 2010 at 10:47 PM, Jangla <jangla.m...@gmail.com> wrote:
> > If I have this code:
>
> > <div id="draggable" class="dodrop dropme">drag me</div>
> > <div id="droppable">drop here</div>
>
> > <script>
> > new Draggable ('draggable', {revert: 'failure', accept: 'dropme'});
> > Droppables.add ('droppable');
> > </script>
>
> > I would expect the dropped element to be accpeted by the droppable but
> > it's not for some reason. Can anyone help me out on this? I have some
> > rather more complex code that results in a div element with the class
> > names "audience-element" and  "Social" like so:
>
> > <div id="audience-element-0" class="audience-element Social"
> > style="top: 0pt; left: 0pt; z-index: 0;">
>
> > As far as I can tell, if I define my droppable like so:
>
> > Droppables.add(audience-element-0, {accept: 'Social', onDrop:
> > this.dropElement});
>
> > ... then this should successfully drop onto the target element and
> > stay there....but it doesn't :(
>
> > Help!!! :)
>
> > --
> > 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.
> > To unsubscribe from this group, send email to
> > prototype-scriptaculous+unsubscr...@googlegroups.com<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
> --
> 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.
> To unsubscribe from this group, send email to 
> prototype-scriptaculous+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/prototype-scriptaculous?hl=en.

-- 
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.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to